 |
|
 |
I worked with the code to get it to compile on an x86 version of Windows 7, running Visual Studio 2008. When I create the VB project and insert the code that starts with:
Dim x As New TRYARRLib.larray
and then compile the code, I get an error saying TRYARRLib.larray is undefined. I have sample codes from several other articles from Microsoft and the Code Project that advertise communication between VC++ and VB with the same result. One such article is a Code Project article titled "A simple yet debuggable COM skeleton code"
|
|
|
|
 |
|
 |
Hello,
I wrote one application which is returning string array from ATL DLL to vb. But it is leaving the last element of the array.
Couldn't get the problem..? Please help me.
Thanx.
Jigar.
|
|
|
|
 |
|
 |
I have tried the source.
But when I run the VB and click the button, it prompted
Run-time error "429":
Active component can't create object
How is this happen?
What should I do to eliminate this error?
Thanks.
Koo
|
|
|
|
 |
|
 |
If I tried to use this ATL dll from vb, it doesn't work!
the code is:
Private Sub Command4_Click()
Dim ciao(1 To 2) As Single
ciao(1) = 0.3
ciao(2) = 5.4
ATLTest.LongArray (ciao())
MsgBox ciao(1)
MsgBox ciao(2)
End Sub
When vb calls ATLTest.longArray(ciao()) says that the type of the parameter doesn't match!
Obviously I modified the UUID declaration changing (long) with (float).
Gianluca Nastasi
|
|
|
|
 |
|
 |
I want to create a Dll in vc++ and use that one in vb and so how can i create a dll in vc++ like a keyboardhook dll whcih is used in vb and where i need a system wide hook ie i want to control for all the applications
|
|
|
|
 |
|
 |
I can't tell you how perfect it was for me that you wrote this article. Exactly as I was looking for. Now if only I had found it 10 hours earlier...
|
|
|
|
 |
|
 |
The following two samples are very effective,but I want a simple programe like Amol Kakhandki's to pass an string array for vc to vb.
Thanks a lot!;)
|
|
|
|
 |
|
 |
Anonymous wrote:
The following two samples are very effective,but I want a simple programe like Amol Kakhandki's to pass an string array for vc to vb.
I need that too. I mean, I have a partial solution, but the Strings returned to VB are unicoded twice, what means I have a Space (or is it a NULL) between every character, when I print the string with debug.print in VB.
VB Declaration:
Private Declare Function PCRE_SubStrings Lib "C:\C-Programme\PCRE_DLL\Debug\pcre_dll.dll" (Text As String, Muster As String, SubStrings() As String) As Long
VB-Call:
Dim SubStrings() As String
Dim Haystack As String
Dim Muster As String
Debug.Print PCRE_SubStrings(Haystack, Muster, SubStrings)
C++-Declaration:
Long _stdcall PCRE_SubStrings(LPTSTR HayStack, LPTSTR Pattern, SAFEARRAY **Olaf);
C++-Implementation:
SAFEARRAYBOUND Bound;
Bound.cElements=pairs;
Bound.lLbound=0;
Long ix[1];
*Olaf=SafeArrayCreate(VT_BSTR, 1, &Bound);
For(i=0;i
Best,
Bernhard
|
|
|
|
 |
|
 |
Is this applicable to ".NET" Framework?
This article doesn't work in Visual Studio .NET.
What's wrong?
Help me !!!
|
|
|
|
 |
|
 |
Is this applicable to ".NET"
|
|
|
|
 |
|
 |
I would appreciate if someone can show me
how to do this with an array of bytes (VT_UI1).
I have tried it, but it seems that the values
come out as negative on the VB side.
|
|
|
|
 |
|
 |
Check out the samples by Ron Jacobs on the Sellsbrothers site.
He has converted the COleSafeArray class without the MFC dependencies. Also sample project between VC++ and VB
You can find it here
http://www.sellsbrothers.com/tools/CComSafeArray.zip
|
|
|
|
 |
|
 |
Hi,
is there a difference in using SafeArrayLock() with a following call to psa->pvData and SafeArrayAccessData()?
I always used SafeArrayAccessData() to get a pointer to the data
TIA
Max
"You can always improve your chances of writing
bug-free code by writing code that doesn't do anything"
Rob Macdonald, Serious ADO
|
|
|
|
 |
|
 |
You are right,SafeArrayAccessData() is a better way of doing it.
its just that i prefer the Lock,Unlock functions.
|
|
|
|
 |
|
 |
Amol Kakhandki wrote:
You are right,SafeArrayAccessData() is a better way of doing it.
its just that i prefer the Lock,Unlock functions.
OK, that's what I want to know
Max
"You can always improve your chances of writing
bug-free code by writing code that doesn't do anything"
Rob Macdonald, Serious ADO
|
|
|
|
 |