Why Failed?????

I got the Address of ExtTextOutW of GDI32.dll,the Address is lower then
0x80000000. Then Change the memory protection property to
PAGE_EXECUTE_READWRITE. Copy some word into the beginning that Address.
But It's failed.The System break down. WHy?
The corresponding code is here:

 FARPROC pTxtCode;

 HMODULE hMGDI=GetModuleHandle("GDI32.Dll");

 BOOL bR=VirtualProtect(pTxtCode,32,PAGE_EXECUTE_READWRITE,&SourceOld);
 BYTE HookCode[8];
//the content of HookCode is a jump asm code:
// HookCode[0]=FFh
// HookCode[1]=78h
// HookCode[2]=10h
// HookCode[3]=0h
// HookCode[4]=10h
//I want to jump in 10001078H.then from 10001078H jump into another
//erery time, this caused System break down


Why? Thank you.


3/23/2006 1:28:07 AM
vc.mfc 33608 articles. 0 followers. Follow

1 Replies

Similar Articles

[PageSpeed] 11



I don't know why break down.
Thank you .


3/23/2006 1:31:40 AM

Similar Artilces:

FindResourceEx fails.
Hello I cant the the following function to work. FindResourceEx returns NULL. TRACE prints 1814 as error. m_wLanguage is 1053, and I got swedish as a lang in my resourcefile. const char* CResourceLoader::GetString(int nId) { HRSRC hResource = FindResourceEx( NULL, RT_STRING, MAKEINTRESOURCE(nId), m_wLanguage); TRACE("%d\n", GetLastError()); if (!hResource) { char szString[512]; LoadString(NULL, nId, szString, 512); return szString; } else return (const char*)LoadResource(NULL, hResource); } Jonas > I cant the the following function to work. FindResourc...

Re: connection fails daily
On 18/12/2009 23:42, fcsark9handler wrote: ????????? *What* did the poster write? -- Dave (Sometimes man stumbles over the truth ...... Sir Winston Churchill) ...

Quick Campaigns are failing
Quick campaigns used to work for us but don't anymore. I get the following error after creating the quick campaign: This Quick Campaign could not be performed due to an error: 0x80131500. For more information, contact your system administrator. with the "Status Reason = aborted" I've searched everywhere for this error but can't find anything. Has anyone seen this before? The only change I made to the server was to use the rule deployment wizard but I also did this on another CRM installation server and Quick Campaigns still work there. Update to this: ...

Consistency Check fails and fails and fails ...
Hello all last Tuesday, we had a Blue Screen on our Home Directories server. After having it restarted, I got a DPM error, thus needing a Consistency Check. Today, one week later, I did 30 Consistency Checks, all having failed with all kinds of errors: - DPM encountered an error while performing an operation for \\?\Volume{83986761-1bce-4d28-bf4c-25bf9d86a50f}\HomeDirectories\K... (ID 2033 Details: The system cannot find the file specified (0x80070002)) - DPM encountered an error while performing an operation for \\?\Volume{83986761-1bce-4d28-bf4c-25bf9d86a50f}\HomeDirectories\G...

Why is collection failing?
I'm creating a wrapper class for a collection object, mainly so I can test whether a given records exists. I'm baffled as to why I'm getting "Invalid procedure or argument" in the exists function when I try to extract the value, whether it actually exists or not. I've tried collection.item and collection(item), same result. BTW, the values are numbers that I convert to strings. Option Compare Database Option Explicit 'this class object extends the collection object to include an 'exists' boolean function Private colStatus As VBA.Collection Private S...

CreateDirectoryW fails
Hi I want to create a directory with more then 300 characters. I am using the CreateDirectoryW function and prepending \\?\ to the path for eg.. CreateDirectoryW("\\\\?\\C:\\Temp\\..." some long name but the function fails with error 123. What could be the problem. I am working on Windows 2000. Regards Jakir Would it hurt to tell us what error 123 means? (I looked it up and it says the fllename syntax is illegal). Give your code snippet below, I'm not surprised. Take a look at CreateDirectoryW. What is its argument type? A Unicode string. So you should supply a Unic...

Users failing to log in to Exchange on some PCs but not others.
Last week a number of laptop users reported that whenever they run Outlook 2002 to access exchange they are being prompted with a login dialogue. As they are already authorised network users this should not be happening. I took the most important users laptop and checked the settings to find everything was OK. I started a test profile and tried to set up the user there. Same problem. I went to another PC and set up a new profile and accessed exchange immediately. Back at the laptop, I reinstalled the Outlook Suite, The Network components and anything else I could think may be at fault, but sti...

Operation Failed error
When I attempt to send a worksheet via email (Outlook 2000) I get "Operation Failed" error. Any ideas? ...

Report Load Failed
when i deploy my project, crystel report have an error "report load failed".This project made in C# desktop application 2008. In solution, there is no error beacuse the crystel report path work well in solution but no well in deployment. ...

Excel fails to save properly
I have a daily exercise in which I copy a web-based datagrid and paste it into an Excel workbook. It's typically up to 6,000 rows +/- and 15 columns wide. It takes a while to paste. After that I block format remove text-wrap and adjust row height and column widths to fit, change the worksheet tab to a description name, then attempt to SAVE AS "XXXX_YYYY-MM-DD.XLS". At this point the worksheet usually becomes unresponsive but not always. If I close Excel and then reopen it, the recovered file can eventually be repaired and saved. Is this a known problem? I suspect th...

FAiled instalation of Exchange 2003
I have just arrived on site and found some one has tried to install exchange 2003 in the domain and then just deleted all the objects before they left. This is now causing great problems, as I have reinstalled exchange 2003 but it, believes that there is a virtual site "old server name” and I can not get rid of it. Every time I create a mail box it does not appear anywhere. Could anyone point me at an article that shows you how to undo all forest and domain preps from your AD so that I may redeploy this server in a working state? I have removed my new server by running the remoevor...

MFC/MDI App fails with "An invalid argument was encountered." on click File menu item.
A message is popping up "An invalid argument was encountered." when the user clicks on the File menu item. I have an MDI app and it appears that the message occurs before any document is selected. When a document file has been opened, the message also pops up, again when the File menu is clicked. The file menu itself never opens. I found the place in VS .NET 2005 that is producing the message: - afxres.rc with the line: AFX_IDS_INVALID_ARG_EXCEPTION "An invalid argument was encountered." The code that uses this seems to be in except.cpp as: IMPLEMENT_DYNAMIC(CInv...

Microsoft CRM 1.2 database expert failed
This message comes from the Microsoft CRM Server Setup. The crm30svrsetup.log has error - 14:36:41| Error| Check ExportXmlValidator : Failure: Microsoft CRM 1.2 database export failed. When you press help I get a "Mal-formed XML found in Microsoft CRM 1.2 Exported Saved Queries" which explains nothing! This is supprising because we have made of making minimal change to CRM 1.2. Somebody else must have a similar erro! Thanks!!r -- Bob H I'm also getting this error. I'm calling Microsoft right now. We have made very minimal customizations. email me at dkuhlman@etec...

stretchdibits fails
This is my function that I wrote to extract AVI frames from AVI file. Actually I wanted to get avi frames into DIB format, converter it DDB and then save it to a file, This is a function that I write to do so, Here SetDIBits function returns O (Error), I don't know what am I doing wrong, Could anyone please tell where I am wrong. BOOL CAviFile::ExtractAVIFrames(CString szFileName) { AVIFileInit(); PAVIFILE avi; int res = AVIFileOpen(&avi, szFileName, OF_READ, NULL); if (res!=AVIERR_OK) { //an error occures if (avi != NULL) AVIFileRelea...

Outlook 2002 and IMAP: Fails to stay connected to IMAP server
Good day, everyone! I'm using Outlook 2002 and Gmail's IMAP service. I'm trying to figure out where the fault lies with my issue. My issue is that Outlook will lose connection to Gmail's IMAP service after a period of inactivity, which prevents me from knowing when I receive new email during this loss of connection. I have to enable a POP3 check to indicate I have mail in case the connection has failed. I have this incoming mail then automatically deleted. Has anyone had this problem? Is this an issue with Outlook or Gmail's IMAP service or just the nature of t...

ExMerge fails ?
Not sure what is making Exmerge fail. From an Win2003+Exch2003 Sp1 Server Tools, I download the latest Exchmerge from microsoft.com. I place the all extracted Exchmerge files under \Exchsrv\Bin Then I launch Exmerge accordingly. I am getting an error message when opening the Mailbox Store. I am logged on as Domain Admins+Exchange Full Admin permissions. The information stores are running OK. Any idea what's wrong ? I tried this on multiple functional mailboxes and I keep getting the same error... [10:38:19] Found 1604 mailbox(es) homed on database 'FIRST STORAGE GROUP/MAILBOX STO...

dsquery failed:The logon attempt failed
Hello, I'm running Windows 2008 Server domain functional level 2008. When I run the dsquery command "dsquery user -u example@domain.com" I get the error message "dsquery failed:The logon attempt failed". Other dsquery commands work fine including "dsquery user -name Example*" and "dsquery user ou=example,dc=domain,dc=com". Any ideas on why I would get the 'dsquery failed:The logon attempt failed' message and how I can fix it? Thank you. -- David dach3 wrote: > Hello, I'm running Windows 2008 Server domain functional ...

Exchange services fail to start
On my Exchange 2003 server when the server reboots the following services fail to start:- MS Exchange System Attendant MS Exchange Information Store MS Exchange MTA Stacks If I wait for about 2-3 minutes I can start the services ok. Is there any known issues and fixes for this and does anyone no of a way to delay the startup of these services? Thanks in advance, Kevin What errors do you see in the Application Log via Event Viewer? -- Mark Fugatt Exchange MVP http://www.exchangetrainer.com http://www.msexchange.org "Kevin Howell" <kevin.howell@nospampleasedatamonline.co.uk...

Reimport XML fails
Followed the instructions here: http://office.microsoft.com/en-us/excel/HA011019641033.aspx#create_map to import an RSS feed for Craig's List: http://newjersey.craigslist.org/zip/index.rss. It works great the first time, but if I want to update it, nothing happens??? Do I have to save the file each time and start with a fresh empty file with just the mapping? LMK - TIA ed ...

DNS test connect to mail servers failed
I ran a DNS test from dnsreport.com and got a failure on "Connect to mail servers". The message was: ERROR: I could not complete a connection to one or more of your mailservers: mail.itsatx.com: The mailserver terminated the connection before the transaction was complete (state 4). This is not RFC compliant, and therefore either due to an error, or it may be the result of a non-RFC-compliant mailserver or non-RFC-compliant anti-spam program. Does anyone know how to correct this or what properties I need to adjust? Bruce Along the lines of my response to your other post, do yo...

<Dim fd As FileDialog> fails to compile
Hello all, If you have ever experienced such an error, please advise what can be the solution to compile a project? When I try to do this I get a "User-defined type is not defined" error. My guess is that I have to set up some reference, but if so - which one? Thank you, Eugene. -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200705/1 In news:7231e6fc4150f@uwe, Eugene via AccessMonster.com <u32520@uwe> wrote: > Hello all, > > If you have ever experienced such an error, please advise what can be > the sol...

outlook send receive fail
when I click on the send receive button, I get a pop up message saying the operation failed. It worked fine before today. Any thoughts would be appreciated. I am having trouble with the send part of that. Has yours been fixed, yet? What did you do? >-----Original Message----- >when I click on the send receive button, I get a pop up >message saying the operation failed. It worked fine >before today. > >Any thoughts would be appreciated. >. > ...

Hi, I have a pop-up menu which appears when the user right clicks on an item in a CTreeView. I created a UI update function for one of the menu items, and mapped it to the item ID using ON_UPDATE_COMMAND_UI. However, the UI update function does not get called until AFTER the menu item has been selected--which of course does nothing for me since at that point the menu is no longer being displayed. I was expecting the function to get called before the menu was displayed, so the menu item in question would be updated before being shown on the screen. Does anyone have any idea of what could be wr...

Debug image fails to load.
Hi, I created an OS design with KITL, Kernel debugger enabled in Debug mode. But when i try to load the image to the CEPC it fails to boot. I am attaching the log here. ------ SERIAL PORT LOG starts ----------- Microsoft Windows CE Ethernet Bootloader Common Library Version 1.0 Built Dec 9 2002 18:35:13 Copyright (c) 2000-2001 Microsoft Corporation Microsoft Windows CE Ethernet Bootloader 3.3 for CE/PC (Feb 6 2003) Boot Args @ 0x1F136 and ucLoaderFlags is 1 PCI Device Configurations (3 PCI bus(es) present)... ======================================================== Bus, Devi...

Logon failed
I am using Live Mail as my default program. When I try to sent a attachment by clicking mail attachment in word 2007 to go through live mail I get this notice. Logon failed. You must log on to Microsoft Exchange to access your address book. What does this mean? Using Office works 2007. W7 professional. Any help would be appreciated. Grumpy Are you using Word's "Send Email" feature? Or are you in WLMail and selecting "Attach", then locating a file via Windows Explorer? "Grumpy" <Grumpy@discussions.microsoft.com> wrote ...