Results 1 to 3 of 3

Thread: I know this might be a brain killer

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2000
    Location
    Sweden
    Posts
    11

    Unhappy

    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

  2. #2
    Fanatic Member
    Join Date
    Feb 2000
    Location
    Japan
    Posts
    840
    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!)

  3. #3

    Thread Starter
    New Member
    Join Date
    Sep 2000
    Location
    Sweden
    Posts
    11

    Thumbs up

    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
  •  



Click Here to Expand Forum to Full Width