|
-
Sep 24th, 2000, 06:45 PM
#1
Thread Starter
New Member
I am tired of the slow VB and I am tired of Designing in
Assembler(even though I use the best Compiler there is Pass32).
I can do Win32 DLL files in Pass32 4 Win32
I know that u always Push the Parameters to the stack when calling DLL's, And u get the Answer in eax
But I do not know how VB codes the "Declare" function
Example
Declare Function Proc Lib "C:\Asm\Pass32\WIN32\testdll.dll" (ByVal N As String) As string 'The VB Line
How does VB code "ByVal N as String", I guess that the offset to the string is pushed into the stack
And the most important Question
How do I get VB to Accept that the DLL returns a string
Assembler is more then a Language, it's a Religion
-
Sep 25th, 2000, 08:04 AM
#2
Fanatic Member
There are several different types of "Strings", in VB a string is like a pointer to a string pointer which is why you:
1) use StrPtr to pass a pointer rather than VarPtr
2) pass a vb string by value to a DLL expecting a string pointer.
If you need to pass a unicode string pointer then what I do is map the unicode to a byte array, and pass varptr(Bytes(0)) to the Dll as a long var.
If you need inline assembly and pointers with basic syntax try:
http://www.powerbasic.com
Paul Dwyer 
Network Engineer
Aussie In Tokyo
Using Powerbasic 6 & VB6 SP4 (Please also add your VB Version to your signature!)
-
Sep 27th, 2000, 06:54 PM
#3
Thread Starter
New Member
Thanks for the tip Paul, hope I can use it.
Assembler is more then a Language, it's a Religion
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|