-
Re: cdecl to stdcall
Don't worry - got it.
; support routines
; written by Paul Edwards
; released to the public domain
.386p
.model flat
.code
extrn __imp__CreateDirectoryA@8:ptr
public _CreateDirectoryA
_CreateDirectoryA:
push 8[esp]
push 8[esp]
call __imp__CreateDirectoryA@8
ret
ret
end
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)
-
I would like to create a library that allows people with
compilers that only do cdecl (ie subc) to call Windows
functions.
So I created some assembler "glue".
I can get a link, but it doesn't actually create the directory,
and then it crashes.
I have tried various combinations.
Any ideas?
.386p
.model flat
.code
extrn __imp__CreateDirectoryA@8:dword
public _CreateDirectoryA
_CreateDirectoryA:
push 8[esp]
push 8[esp]
push [__imp__CreateDirectoryA@8]
ret
ret
Thanks. Paul.
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)
-
Not sure if I've mentioned before, but there's a genuine
public domain partly masm-compatible assembler called
as86. And while masm accepted that previous code, as86
requires this variation that masm also supports.
And now SubC can use Windows functions! :-)
BFN. Paul.
.386p
.model flat
.code
extrn __imp__CreateDirectoryA@8:ptr
public _CreateDirectoryA
_CreateDirectoryA:
push 8[esp]
push 8[esp]
call [__imp__CreateDirectoryA@8]
ret
ret
end
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)