Results 1 to 3 of 3

Thread: problem when use an vb6 api in vb.net

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2006
    Location
    greece athens
    Posts
    115

    Question problem when use an vb6 api in vb.net

    try to use in vb.net an api which is used in a similar vb6 code .the api was created in vb6 code and succesfully works in vb6 code but when i use a vb.net the same code as vb6 when i run the exe it says that it could not load the <api name>

  2. #2
    Fanatic Member TTn's Avatar
    Join Date
    Jul 2004
    Posts
    708

    Re: problem when use an vb6 api in vb.net

    Show us how you are trying it, because it could be a few things.

    I'm guessing that maybe you are still using "As Long", instead of "As Int32".
    Maybe you are not using an Alias that's different than the function name.

    Here is an example of how to declare API's the old way, with VB.NET.
    Code:
    Private Declare Function apiGetForegroundWindow Lib "user32" Alias "GetForegroundWindow" () As Int32

  3. #3
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: problem when use an vb6 api in vb.net

    Quote Originally Posted by chriskaza81
    try to use in vb.net an api which is used in a similar vb6 code .the api was created in vb6 code and succesfully works in vb6 code but when i use a vb.net the same code as vb6 when i run the exe it says that it could not load the <api name>
    Which API?

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