|
-
Aug 18th, 2010, 08:18 PM
#1
Thread Starter
New Member
ExTextOut outputs random characters
Hi,
I'm sort of new to the whole Windows API.. I was stuck between posting my thread here or C# forum since my code is in C#.. Anyway, I've injected a .dll and I'm successfully capturing ExTextOut function calls and sending the text to the command prompt window. However, my text from the "lpString" seems to be just all random characters (Is this some kind of pointer or is this the text and it is just in need of some formatting??
I've been doing some research and have come across similar issues and seen people pass around ETO_GLYPH_INDEX. I'm not sure how to go about using ETO_GLYPH_INDEX? Can anyone give me some insight?
Thanks
-
Aug 19th, 2010, 11:59 PM
#2
Re: ExTextOut outputs random characters
Without seeing the actual code involved it's difficult to guess what the cause may be. However as a general rule, when passing strings to / from APIs with VB, they have to be passed ByVal since the string variable address in VB is actually the address of the address. If the API is returning a sting you must initialise it (eg fill with spaces) to at least the length of the data to be returned. Not doing this can cause unpredictable results and more often than not VB crashes.
EDIT: I've just noted that your code is in C, so the above is not going to be of much use! (Sorry about that)
I suspect a Mod will move this thread to the appropriate forum.
Last edited by Doogle; Aug 20th, 2010 at 12:14 AM.
-
Aug 22nd, 2010, 03:58 PM
#3
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|