- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How does one get wsprintf to work?
I use READ..WRITE for text conversion...but wsprintf is one of the few APIs that I can't get to work.
Is it the _cdecl C calling convention?
Is it how the arguments are moved on the stack?
Enclose is one example of some code I tried with default project settings.
! Start.
'
'
USE DfWin ! Right?
INTEGER i
CHARACTER*25 lpStrg
i=wsprintf(lpStrg,"%s",'Hello'c)
'
'
! End.
! Produces the following error:
Error: This name does not have a type, and must have an explicit type. [WSPRINTF]
It seems the function can not be located, right?
Thank You!
I use READ..WRITE for text conversion...but wsprintf is one of the few APIs that I can't get to work.
Is it the _cdecl C calling convention?
Is it how the arguments are moved on the stack?
Enclose is one example of some code I tried with default project settings.
! Start.
'
'
USE DfWin ! Right?
INTEGER i
CHARACTER*25 lpStrg
i=wsprintf(lpStrg,"%s",'Hello'c)
'
'
! End.
! Produces the following error:
Error: This name does not have a type, and must have an explicit type. [WSPRINTF]
It seems the function can not be located, right?
Thank You!
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I don't see why you need wsprintf -- simple internal WRITE would do it simplier and purer:
WRITE(lpStrg,'(A)') 'Hello'C
I think that's the reason why Compaq didn't even include it in Win32 headers. And yes, it's C calling convention.
Jugoslav
WRITE(lpStrg,'(A)') 'Hello'C
I think that's the reason why Compaq didn't even include it in Win32 headers. And yes, it's C calling convention.
Jugoslav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank You!

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page