News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Linking C With ASM

Started by Ehtyar, October 19, 2006, 11:06:16 PM

Previous topic - Next topic

Relvinian

Here is part of the description from a Platform SDK help on GetEnvironmentStrings:


prototype:  LPVOID GetEnvironmentStrings(void);

Remarks
The GetEnvironmentStrings function returns a pointer to a block of memory
that contains the environment variables of the calling process. Treat this memory
as read-only; do not modify it directly.


This shouldn't have any 'A' or 'W' for ANSI or UNICODE. So if the MASM32 Kernel32.lib has A or W defined, then it is indeed incorrect and needs to be fixed.

Relvinian

drizz

Quote from: Ehtyar on October 22, 2006, 02:38:57 AMYou won't believe this. All i had to do was specify WinMain as the entry point...and lookie lookie
you shouldn't do that, try doing what i wrote in my previous post.
The truth cannot be learned ... it can only be recognized.

Ehtyar

As i said drizz, yours crashed, until i put /ENTRY:WinMain in the linker command line.
Unfortunately, the dll i was going to use in this project is packed with petite, and the author refuses to give me an unpacked copy, despite the fact that it is freeware (i won't make further comment on this topic as i'm afraid streams of profanity may find their way into my post) thus i cannot use it as a memory module, thus i cannot create the project i was hoping to. Therefore, i will not be posting the project i was hoping to create, sorry guys, and thanks again for the help.

Regards, Ehtyar.