How to call a 'C' program function from VB code ?
-
Perhaps, via a COM dll?
-
Perhaps, via a COM dll?
-
So which part do you need help with: creating an exported function in C, or using said function in VB?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
-
So which part do you need help with: creating an exported function in C, or using said function in VB?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
-
Read point #2 here. As to how to export a function from a DLL, see here. For declaring a reference to an external function in a DLL, see here.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
-
Hi, There is a really old article from 2005[^] that demonstrates how to do this. If you scroll to the bottom of the forum you might find a younger Randor lurking there. His username wasn't even red like a rooster yet. Best Wishes, -David Delaune
-
Hi, There is a really old article from 2005[^] that demonstrates how to do this. If you scroll to the bottom of the forum you might find a younger Randor lurking there. His username wasn't even red like a rooster yet. Best Wishes, -David Delaune
:laugh:
«_Superman_» _I love work. It gives me something to do between weekends.
_Microsoft MVP (Visual C++) (October 2009 - September 2013)