-
Mar 3rd, 2021, 10:22 AM
#41
Re: [VB6] VBCDeclFix - The Add-in allows you to use Cdecl functions in VB6 IDE.
how do you make this add-in with 3600 lines code,
do you work in microsoft?
-
Mar 3rd, 2021, 10:43 AM
#42
Re: [VB6] VBCDeclFix - The Add-in allows you to use Cdecl functions in VB6 IDE.
Originally Posted by xiaoyao
how do you make this add-in with 3600 lines code,
do you work in microsoft?
From description:
All the information obtained during my own superficial reverse engineering experience therefore, everything described above may not work exactly like that, or even not at all.
I have never worked for MS at all.
-
Mar 5th, 2021, 02:08 AM
#43
Hyperactive Member
Re: [VB6] VBCDeclFix - The Add-in allows you to use Cdecl functions in VB6 IDE.
hello the trick.
can you tranport this addin for office vba to use?
-
Mar 5th, 2021, 02:20 AM
#44
Re: [VB6] VBCDeclFix - The Add-in allows you to use Cdecl functions in VB6 IDE.
Originally Posted by loquat
hello the trick.
can you tranport this addin for office vba to use?
What's the VBA version?
-
Mar 6th, 2021, 08:27 AM
#45
Re: [VB6] VBCDeclFix - The Add-in allows you to use Cdecl functions in VB6 IDE.
Originally Posted by loquat
hello the trick.
can you tranport this addin for office vba to use?
USE ASM,it's support vb6 ide,exe,excel vba
Bind Cdecl Api To vb6 Function(stdcall),support run in IDE-VBForums
https://www.vbforums.com/showthread....ort-run-in-IDE
code in userform1:
Code:
Dim h As Long
Dim CdeclApi_Add As Long
Private Sub CommandButton1_Click()
If CdeclApi_Add = 0 Then
h = LoadLibrary(Application.ActiveWorkbook.Path & "\cdecl.dll")
CdeclApi_Add = GetProcAddress(h, "Add")
If h = 0 Or CdeclApi_Add = 0 Then MsgBox "can't find dll": Exit Sub
FixCdecl GetAddress(AddressOf VB_Add), CdeclApi_Add, 2
End If
Dim a As Long, b As Long, c As Long
a = 44
b = 55
c = VB_Add(a, b)
MsgBox "c=" & c
End Sub
Private Sub UserForm_Terminate()
RestoreFunctionMemory
FreeLibrary h
End Sub
Last edited by xiaoyao; Mar 6th, 2021 at 09:52 AM.
-
Mar 7th, 2021, 03:21 AM
#46
New Member
Re: [VB6] VBCDeclFix - The Add-in allows you to use Cdecl functions in VB6 IDE.
Thanks for your great job!
I want to know if it can direct use chromedriver.exe in vb6?
thanks a lot.
Joh.
-
Mar 7th, 2021, 10:06 AM
#47
Re: [VB6] VBCDeclFix - The Add-in allows you to use Cdecl functions in VB6 IDE.
may be have simple way:
c= cdeclapi_add(11,22)
call VB_AddEsp(8)
sub VB_AddEsp(espvalue as long)'args=2,espvalue=4
'asm:add esp,espvalue
end sub
-
Mar 7th, 2021, 10:21 AM
#48
Re: [VB6] VBCDeclFix - The Add-in allows you to use Cdecl functions in VB6 IDE.
Originally Posted by MacroJohn
Thanks for your great job!
I want to know if it can direct use chromedriver.exe in vb6?
thanks a lot.
Joh.
How to use this driver in C/C++? The same approach i think will be in VB6 as well.
may be have simple way:
c= cdeclapi_add(11,22)
call VB_AddEsp(8)
sub VB_AddEsp(espvalue as long)'args=2,espvalue=4
'asm:add esp,espvalue
end sub
Stop!
-
Mar 7th, 2021, 09:07 PM
#49
New Member
Re: [VB6] VBCDeclFix - The Add-in allows you to use Cdecl functions in VB6 IDE.
Originally Posted by The trick
How to use this driver in C/C++? The same approach i think will be in VB6 as well.
Stop!
Thank you for your reply.
I tested your Add-in, it worked great. For a long time, vb6 has always faced the threat of being eliminated. It is precisely because of a group of selfless contributors like you that make vb6's life continue, and which give courages and helps for many developers. The discussion of CDeclFix in the group gave me an idea, whether this method can be used as a universal and widely accepted method to break through the limitations of vb6 functions.It may need to use a large number of practical examples to practice.
For example, I am currently testing the automatic operation of the browser. The most commonly used in vb6 is seleniumbasic, but Seleniumbasic has not been updated, and the so-called seleniumbaisc3.14 on the Internet is not open source, potential safety hazards would be exist.
whether or not without relying on seleniumbasic, directly use C# or other versions of selenium in vb6 to drive chromedriver.exe? But I have almost no idea in this regard.
If it can be realized by CDeclFix method, then it further proves VBCDeclFix's great contribution to the vitality of vb6.
Can you give me some suggestions, or try to explore it?
Thank you again for your kind reply!
Joh.
-
Mar 8th, 2021, 01:05 AM
#50
Hyperactive Member
Re: [VB6] VBCDeclFix - The Add-in allows you to use Cdecl functions in VB6 IDE.
Originally Posted by The trick
What's the VBA version?
vba 7.0 or 7.1, x86 will be ok
maybe you can transport to one of the version and told us how to finish the others.
-
Mar 9th, 2021, 02:16 AM
#51
Hyperactive Member
Re: [VB6] VBCDeclFix - The Add-in allows you to use Cdecl functions in VB6 IDE.
i have one question, does the compiled exe or dll need this addin at all?
-
Mar 9th, 2021, 02:24 AM
#52
Re: [VB6] VBCDeclFix - The Add-in allows you to use Cdecl functions in VB6 IDE.
Originally Posted by loquat
i have one question, does the compiled exe or dll need this addin at all?
No. The Add-in is for VB6-IDE only.
-
Mar 14th, 2021, 10:35 AM
#53
Re: [VB6] VBCDeclFix - The Add-in allows you to use Cdecl functions in VB6 IDE.
I removed a series of posts that were unrelated to the topic of this thread aside from what appeared to be an attempt to provide an alternative solution. If anybody has a different solution to this problem, they are free to start a thread of their own, but they should not attempt to subvert this one.
My usual boring signature: Nothing
-
May 21st, 2021, 03:09 AM
#54
Frenzied Member
Re: [VB6] VBCDeclFix - The Add-in allows you to use Cdecl functions in VB6 IDE.
Originally Posted by The trick
The Add-in allows you to use Cdecl functions in VB6 both declared in type libraries and using the CDecl keyword.
If you have ever tried to use CDECL-functions declared in a TLB then you know that debugging (in IDE) is impossible. The project just has crashed and doesn't even start although compilation to native code works without any issues. A similar problem occurs when using the CDecl keyword - VB6 always generates the code with the 0x31 error ( Bad Dll Calling Convention) so you can use such functions neither IDE nor compiled executable. This Add-in fixes this behavior and you can debug your code in IDE and compile the code to an executable file.
https://github.com/thetrik/VBCDeclFix
This is great, but how to I install it? I don't know how to install VB6 addons. Is it supposed to come with a setup.exe file? I only found the DLL file by itself.
-
May 21st, 2021, 04:54 AM
#55
Re: [VB6] VBCDeclFix - The Add-in allows you to use Cdecl functions in VB6 IDE.
Just register it and it should be available from the Add-In menu option.
-
May 25th, 2021, 10:18 PM
#56
Lively Member
Re: [VB6] VBCDeclFix - The Add-in allows you to use Cdecl functions in VB6 IDE.
Originally Posted by The trick
No. The Add-in is for VB6-IDE only.
I'm trying to use lib libcurl.dll, it works perfectly in the IDE, but not in the exe, do you have any suggestions?
Private Declare Function curl_easy_init CDecl Lib "libcurl.dll" () As Long
Private Declare Function curl_easy_setopt CDecl Lib "libcurl.dll" (ByVal curl_easy_init As Long, ByVal OpTS As Long, Data As Any) As Long
Private Declare Function curl_easy_perform CDecl Lib "libcurl.dll" (ByVal curl_easy_init As Long) As Long
Private Declare Function curl_easy_cleanup CDecl Lib "libcurl.dll" (ByVal curl_easy_init As Long) As Long
Private Declare Function curl_slist_append CDecl Lib "libcurl.dll" (ByVal curl_list_handle As Long, ByVal lpStr As String) As Long
Private Declare Function curl_slist_free_all CDecl Lib "libcurl.dll" (ByVal curl_list_handle As Long) As Long
Private Declare Function curl_easy_escape CDecl Lib "libcurl.dll" (ByVal curl_easy_init As Long, ByVal lpStr As String, ByVal strsize As Long) As Long
For information
So it worked
Private Declare Function curl_easy_init Lib "libcurl.dll" () As Long
not like this
Private Declare Function curl_easy_init CDecl Lib "libcurl.dll" () As Long
-
Feb 11th, 2022, 01:13 AM
#57
Hyperactive Member
Re: [VB6] VBCDeclFix - The Add-in allows you to use Cdecl functions in VB6 IDE.
i found some cdecl dll that will crash vb6ide, such as libchardet.dll ver1.0.6
-
Feb 11th, 2022, 07:17 AM
#58
Re: [VB6] VBCDeclFix - The Add-in allows you to use Cdecl functions in VB6 IDE.
What's the code exactly? Is it related to Add-in or?
-
Dec 18th, 2022, 07:45 AM
#59
Hyperactive Member
Re: [VB6] VBCDeclFix - The Add-in allows you to use Cdecl functions in VB6 IDE.
hello the trick, can you tell me is there some patch operations that we can make to the vba6.dll itself.
i m still working on how to transport this addin to vba x86
-
Dec 18th, 2022, 10:13 PM
#60
Re: [VB6] VBCDeclFix - The Add-in allows you to use Cdecl functions in VB6 IDE.
Some times the difference of IDE from compiled version has to do with the use of variants. A variant with long value, may work by reference to a long value, in a call, at IDE but not at the compiled version. So look all the types of passed parameters and function's declarations (signature).
-
Apr 18th, 2023, 08:41 PM
#61
Re: [VB6] VBCDeclFix - The Add-in allows you to use Cdecl functions in VB6 IDE.
CAN'T LOAD Connect.Dsr ON CHINESE VB6
AND CAN'T REGSVR32 CDeclFix.dll
-
Apr 18th, 2023, 08:46 PM
#62
Re: [VB6] VBCDeclFix - The Add-in allows you to use Cdecl functions in VB6 IDE.
Originally Posted by MacroJohn
Thank you for your reply.
I tested your Add-in, it worked great. For a long time, vb6 has always faced the threat of being eliminated. It is precisely because of a group of selfless contributors like you that make vb6's life continue, and which give courages and helps for many developers. The discussion of CDeclFix in the group gave me an idea, whether this method can be used as a universal and widely accepted method to break through the limitations of vb6 functions.It may need to use a large number of practical examples to practice.
For example, I am currently testing the automatic operation of the browser. The most commonly used in vb6 is seleniumbasic, but Seleniumbasic has not been updated, and the so-called seleniumbaisc3.14 on the Internet is not open source, potential safety hazards would be exist.
whether or not without relying on seleniumbasic, directly use C# or other versions of selenium in vb6 to drive chromedriver.exe? But I have almost no idea in this regard.
If it can be realized by CDeclFix method, then it further proves VBCDeclFix's great contribution to the vitality of vb6.
Can you give me some suggestions, or try to explore it?
Thank you again for your kind reply!
Joh.
LIKE vbrichclien6,WebView2Loader.dll
Someone needs to keep updating. In fact, the Google debugging protocol is an HTTP request or websocket communication.
Implementing 3-5 features is not difficult, but to implement hundreds or thousands of interfaces, a development team needs to keep up with Google's upgrades.
Tags for this Thread
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
|