Hi Alex,
The following is not object oriented. Instead it converts your code to a procedural form. If you are set on an object oriented approach to assembly language coding check out the object oriented forum at:
http://board.win32asmcommunity.net/index.php...
MeltClassDesc struct 4
; MeltClassDesc data
MeltClassDesc ends
.data
controlsInit DWORD FALSE
.data?
hinstance DWORD ?
MeltCD MeltClassDesc <?> ; static MeltClassDesc MeltCD
.code
DllEntry proc hInstDLL:HINSTANCE, fdwReason:DWORD, lpvReserved:DWORD
push hinstDLL
pop hInstance
mov eax, controlsInit
or eax, eax
jz EXIT
mov controlsInit, TRUE
push hInstance
call InitCustomControls
call InitCommonControls
EXIT:
mov eax, TRUE
ret
DllEntry endp
LibClassDesc proc i:DWORD
mov eax, i
or eax, eax
jnz EXITLIBCLASS
lea eax, MeltCD
ret
EXITLIBCLASS
mov eax, 0
ret
LibClassDesc endp
IsPublic proc
mov eax, TRUE
ret
IsPublic endp
Create proc loading:DWORD ; no default value...
call Get ProcessHeap
push sizeof MeltMod
push 0
push eax
call HeapAlloc
; Note no constructor for MeltMod object called.
; The C++ compiler inserts this call in your C++ code during compilation
; If you need to initialise this memory you will have to explicitly do so yourself
ret
Create endp
... etc etc
Note you will have to create a def file with something like the following:
LIBRARY MeltMod
EXPORTS LibClassDesc
and include it in your .wap project. This has the same effect as using __declspec(dllexport) in (Microsoft) C++, that is the function will be exported for use by any application loading your .dll.
Hope this is of some use to you,
Cheers,
Andrew