GetMenuItemInfo access violation in user32.dll

when accessing from another proces

void getMenuItem(HWND hWndMenu

HMENU menu = GetMenu(hWndMenu)
MENUITEMINFO mi, *_mi; unsigned long pid;
HANDLE process

GetWindowThreadProcessId(hWndMenu, &pid)
process=OpenProcess (PROCESS_VM_OPERATION|PROCESS_VM_READ|PROCESS_VM_WRITE|PROCESS_QUERY_INFORMATION, FALSE, pid)
_mi=(MENUITEMINFO*)VirtualAllocEx(process, NULL, sizeof(MENUITEMINFO), MEM_COMMIT, PAGE_READWRITE)

ZeroMemory(&mi, sizeof(MENUITEMINFO))

mi.cbSize = sizeof(MENUITEMINFO)
mi.fMask = MIIM_TYPE
mi.fType = MFT_STRING
mi.dwTypeData=NULL
WriteProcessMemory(process, _mi, &mi, sizeof(MENUITEMINFO), NULL)
// this fails GetMenuItemInfo(menu, 1, true, _mi);
ReadProcessMemory(process, _mi, mi, sizeof(MENUITEMINFO), NULL)
int size = mi.cch
VirtualFreeEx(process, _mi, 0, MEM_RELEASE);

0
anonymous (74722)
4/1/2004 4:56:10 AM
vc.mfc 33608 articles. 0 followers. Follow

0 Replies
443 Views

Similar Articles

[PageSpeed] 58

Reply:

Similar Artilces:

Outlook XP Cannot Access Exchange 5.5
Hi all, We are currently migrating our outlook clients from 2000 to XP. But with some users (1 out of 10) cannot access there mailbox, on our exchange 5.5 SP server, with Outlook XP. They get a dialog asking them for there username and password. When you type in nothing happens no error, you just have retype the password. If they use Outlook 2000 they can there mailbox just fine. I have found MS KB 297781 "You Repeatedly Receive a Prompt for Credentials When You Log On to the E-mail Server" But this seems to be only if access with a pop3 account. Is this a know problem?...

A2K-TOOLS
Hi, i want to create a form to convert several hundreds of A97 dbs to A2K. does anybody know what which routines are behind the Convert to current Database-Version in the A2K-Tools Database Utilities option. How could this be integrated in my form for the convert-loop over the a97-dbs. many thanks f=FCr helping The vast, vast majority of Access 97 databases can be opened in Access 2000 (or any later version) and saved in Access 2000 format. No, I don't have a suggestion as to how you would automate that task. There are, however, some very accomplished Access developers...

Using Access form to assign values of variables in an Excel VBA program
I have created a VBA program for Ms Excel.But,to get desired results, every time, I go into the code to change the values of variables.Is there a way to get the values of variables stored in an Access table? YOu need to do a search for ADO method (ActiveX Data Object). There are plenty of example of code on the web. You need to add two references in your VBA to use the method. from VBA menu tools - References 1) Microsoft Access XX.X object library 2) Microsfot ActiveX Data Objects X.X library Use the latest versio of the two libraries on your PC. You will make a conn...

Filemaker vs. Access
Is Filemaker better than Access? I have been using Access since Access97 and find it quite easy to understand and can pretty much do anything with it. Has anyone used both? Comments please. JB All depends on what you are doing with it. My personal opinion: FileMaker is easier for some things. Access does has some powerful features that are missing in FileMaker. At the same time, a lot of users don't need the extra features. FileMaker can be frustrating at times, just because of terminology difference, if you are going from Access to FileMaker. But once you are used to one o...

Filling LIstBox with Access users names
Hi Does anyone know how to fill a listbox withthe login names of Database users when Access security has been implemented, i want to be able to delete a user from the system using the listbox to select the user to delete. Many thanks Stuart -- Message posted via http://www.accessmonster.com You can cycle on the Users collection: For Each x In DBEngine.Workspaces(0).Users ... Next x It would be a matter to append the user name to a list of values. Hoping it may help, Vanderghast, Access MVP "Stuart Jack via AccessMonster.com" <u31758@uw...

Data from Excel to Access Table
Hello, I have this code setup in Excel but I want to be able to upload multiple rows at one time. Is there a way to incorporate this into my code? Also, is there a way to upload cells that are blank as well? Right now it won't allow me to upload cells that are blank. Can this be done? Sub UploadData() Dim MyCn As ADODB.Connection Dim SQLStr As String Set MyCn = New ADODB.Connection MyCn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; " & _ "DBQ=\\Bcar1\bcar-net\Quality-ISO\Quality-Control\BC-Quality-Control\BC QA mdb\BC Quality Action Database.mdb;SystemDB=\...

Localization dll
Hi, I am developing a hook under VS2005 and need to localize it for different countries. I added the app.resource.dll to the global assembly, but SO ignores the localized version. It uses the standard language. Does anybody has a sloution? Thanks, Martin On Wed, 18 Apr 2007 14:44:00 -0700, martin <martin@discussions.microsoft.com> wrote: >Hi, >I am developing a hook under VS2005 and need to localize it for different >countries. >I added the app.resource.dll to the global assembly, but SO ignores the >localized version. It uses the standard language. > >Does a...

Data entry slow in an Access project
I am using a form for data entry in an Access 2003 project. The back-end data is on a remote server reached over the internet. The data source for the form is a table with 3200 records. The form also displays 6 sub-forms which display data from child tables of the main table. There is a 3-4 second delay when the user moves from one field to another on the form after modifying an existing record or entering data for a new record. During the delay, the status bar below displays a 'Calculating' message. The table is not actually updated until the user moves to a different record ...

mapi32.dll #2
I have an annoying error message pop-up which I cannot figure out how to neutralize. The pop-up says that there is an internal error in the module mapi32.dll It also says that if I do not resolve this issue it could render outlook and outlook express non-functional. I don't use either program at all and wonder how I can get rid of the error message popping up. HELP!!! find and run fixmapi.exe. it should be on your hard drive. if you use another mapi program, like eudora and don't use outlook, uninstall outlook. (you'll need to leave OE installed) william wrote: >...

Access Coding from 2003 to 2007
Is there an easy way to find conversion code from Access 2003 to Access 2007 we are currently in the conversion process but not all of our coding is working how we need it to. They all worked in 2003 properly. What's not working? It should be relatively straightforward if you have used only the core libraries (VBA, Access, and DAO), your database is in a trusted location, and you are not too tied to menus/toolbars Generic conversion info: http://allenbrowne.com/Access2007.html -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - ht...

Microsoft Access has a problem
I do work for a company which runs Microsof Access on a Terminal Server. Weeks can go by without any problems and then we have a few days where they get the "Microsoft Access has a problem" screen whenever an database is opened. If autostart is disabled and the code behind a form loading is run step by step all is well, but I am wondering if anyone else has had a similar problem. Many thanks Peter Kinsman Dear Peter, 1. Do you have good backups and backup schedule? 2. Could you mention the version of Access that you are running? 2B. What is your structure? Front end on...

Changing Format of Access Field via Query?
HI all, Here is what i have, two Oracle tables across multiple schemas that I cannot change the actual format in the table. One table has the field = Text The other table has the field = Number/Decimal/10 Precision I need to link these two together to run some data and currently I have been making a temp table and changing the TEXT one to a NUMBER but am wondering if there is a way to change the Format of the TEXT one to a Number in a query which would save me from having to always be making a TEMP TABLE. Thanks in advance for any help you can give.. Aaron Try using an aliased column lik...

access 97 begins without instructions, Why?
My office 97 Access Program begins automatically and it just began to happen. Is there someway to make this from happening? It is very frustrating when your logging into the computer and all of a sudden access 97 starts to run .. dusty68 <dusty68@discussions.microsoft.com> wrote: >My office 97 Access Program begins automatically and it just began to happen. > >Is there someway to make this from happening? It is very frustrating when >your logging into the computer and all of a sudden access 97 starts to run .. Check your Start >> All Programs >&g...

Access 97 "Unrecognized Database Format"
After our Novell Server crashed last week, all of the files had to be restored from backup. Some of the Access 97 databases will not open now. The error states "Unrecognized Database Format". The files in question have an .Mde file extension. Any suggestions? Thank you, Sandy M. "Sandy M." <Sandy.Mullen@emersonprocess.com> wrote in message news:0c9901c36d71$e28d9f10$a501280a@phx.gbl... > After our Novell Server crashed last week, all of > the files had to be restored from backup. > > Some of the Access 97 databases will not open now. > > The e...

resource-only DLL and LNK2019 error!!
Hi, i'm developing a resource-only DLL, using /NOENTRY option the linker returns: error LNK2019: unresolved external symbol _main referenced in function _mainCRTStartup Any help!? Thanks Ale > i'm developing a resource-only DLL, using /NOENTRY option the linker returns: > > error LNK2019: unresolved external symbol _main referenced in function > _mainCRTStartup Are you also using /DLL (just making sure)? Can you tell us the full command line? -- Mihai Nita [Microsoft MVP, Windows - SDK] ------------------------------------------ Replace _year_ with _ to get the ...

MS Exchange problem
Hi We are using Windows 2003 Server and MS Exchange 2003. I get the following message when i tried to access system manager of MS Exchange 2003. "Access is denied, Facility Win32, ID No: c0070005, Exchange System Manager" click ok and it quits. Similarly, I cannot access "Active Directory Users & Computers", it runs ok but when I click on a User object or any object for that matter I get; "Microsoft Active Directory - Exchange Extension, Access is denied, Facility Win32, ID No: c0070005, Exchange System Manager" I click ok then the MMC quits. This ...

error line 1344 res://C:\WINNT\System32\shdoclc.dll/preview.dlg
I am having the same problem. Any help would be greatly appreciated. ...

How can I open an Access adp file from excel?
I am basically tryi8ng open the database of aan *adp project to be able to manunally work on the tables. Ultematerly I would like to upsize the data base to sql. Wen we double click to open the *adp using access, the application opens, but we can't work the menus to access the database. I understand the *.adp can be opened from excel. In any case, how can we get to the tables? We'd like to re-write the front end, but wopuld like to safe the db design time. Thanks ...

Slow MS Access DB over WAN
We have an MS Access 2000 application run over a WAN (wintel server). It is built with a frontend on the users machine and backend on the shared drive of the server. The shared drive is near the root (2 folders away), is accessed by 50 or less people running Access 2000 to 2003 over the WAN, the backend is less than 50 MBs in size, and has only 150,000 records in it. The DB runs exceptionally slow! Just opening forms or reports can take two minutes each! Very frustrating! We have followed Microsoft's recommendations for building this thing but is so slow that it is not very useable. ...

mpr.dll
when i open mpr.dll by sidewalk program in support tools i receive a red icon in this program that indicates one or more functions of this dll is not recongnized what should i do and how do i fix it? In news:OXVQ5og7KHA.3964@TK2MSFTNGP05.phx.gbl, Mammad DN <mm_64_hiphop@yahoo.co.uk> typed: > when i open mpr.dll by sidewalk program in support tools i > receive a red icon in this program that indicates one or > more functions of this dll is not recongnized what should i > do and how do i fix it? -- -- http://en.wikipedia.org/wiki/Cross_posting ...

MS Access start up: very slow
Hi All, Since a while, starting my MS Access 2000 (on a WXP platform) takes too much time. The average start-up time is approx. 45 seconds. And that's without opening any database. For comparison: starting Word takes about 6 seconds. And starting any other application takes al long as expected. I cannot think what might have caused this change. I was used to a start-up time of several seconds instead of 45 seconds. I already tried to repair the Access and Office installation, but without noticible effect. Who can give my any advise to solve this problem? Thanks in advance! Paul Pau...

Optimize Access forms
Hello Folks, I have one Access application linked with SQL Server. There are few forms loaded with lots of subforms and comboboxes. It takes 1 minute or more to completely load one form. Is there any way I can optimize these forms? There are some comboboxes which contains the same information. Is there any way, I can store the values and then copy it and use it for other comboboxes to populate? This way I might save the time to fetch records from db. I fetched data in rst object and wrote combobox1.Recordset = rst.Clone but it does not seem working. Does anybody have any solid solution or ...

Access 97 to Access 2003 04-04-06
Hi All! Thanking anyone for a reply. Was A97 until I came into work. IT updated it to 2003 while I was away. Sob! Sob! Work to do! I have been told all my A97 databases have to be converted to 2003 by the IT staff. Could I do it myself & what is involved. Regards Peter McCartney Usually it's as simple as opening the database using Access 2003, and letting it convert. You might want to check what Allen Browne has at http://www.allenbrowne.com/ser-48.html -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no private e-mails, please) "RBDU" <nsw8235@...

Accessing shared mailbox from outlook 2003 using IMAP
Hi All, I am facing a problem in accessing a shared mailbox on an exchange server using outlook 2003 and IMAP. I have authorized to access the mailbox, but I dont know the exact steps for accessing the shared mailbox. I have googled a lot, but unable to find the procedure. Please help me in resolving this. Thanks in advance, am Goto Tools--> Email Accounts --> Click on "Change" button for your exchange server account and then click to select "More Settings". Now navigate to the Advanced tab and you should be able to add the additional mailbox for which you hav...

Access query
I have a access query that I would like to show in my excel spreadsheet. Is there a way to insert? In the destination workbook, choose Data>Import External Data>New Database Query Click on MS Access Database as the data source, and click OK Select the database with the list, and click OK In the Query Wizard, select your query, and click the > button, to add the columns to the query Click Next, three times, then click Finish. Select a starting cell for the imported list, and click OK Right-click a cell in the imported list, and click Data Range Properties Add a check mark to R...