News:

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

Library Problem

Started by Astro, July 23, 2009, 11:49:06 AM

Previous topic - Next topic

Astro

Quote from: ToutEnMasm on July 23, 2009, 05:07:20 PM
I try with success this two

Quote
CheckForDevice=CheckDevice2.CheckForDevice,@1
HeapAlloc = NTDLL.RtlAllocHeap,@2
My build environment is masm32


* What did you put in the .asm file?
* How did you build the project?

I've been experimenting with exporting ordinals all afternoon and it kept refusing NONAME - why is it working now??!!  :eek :eek :eek

I don't have prototypes for the ordinal functions in msgina.dll. Any suggestions?

Thanks for the link - reading now.

Best regards,
Astro.

Astro

 :eek :eek

AARRRRRGGGGHHHHH!!!!!!! Why didn't that work earlier???!!!!!!  :eek

Stub:

.386
.model flat,stdcall

.code

DllEntry proc hInstDLL:DWORD, reason:DWORD, reserved1:DWORD
        mov eax,1h
ret 0Ch
DllEntry endp

CheckForDevice proc
CheckForDevice endp

end DllEntry


Exports:

LIBRARY CheckDevice
EXPORTS
CheckForDevice=CheckDevice2.CheckForDevice


EDIT: GAH! The combination I didn't try was the exports AND the empty function!!!  :eek

Best regards,
Astro.

Astro

 :cheekygreen:

Thanks for the help!! Got it working now.  :8)

Best regards,
Astro.

Astro

Seems you can also re-direct using ordinals.

I created the "real" DLL using ordinals only (NONAME), then created the stub using the following:

LIBRARY CheckDevice
EXPORTS
CheckForDevice=CheckDevice2.#1


where #1 is the ordinal.

Best regards,
Astro.

Astro

I created the real GINA.dll stub using only exports, put it into a VM and it worked first time!!  :dance:

Best regards,
Astro.