•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the C# section within the Software Development category of DaniWeb, a massive community of 456,526 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,807 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C# advertiser: Programming Forums
Views: 2406 | Replies: 0
![]() |
•
•
Join Date: Aug 2007
Posts: 16
Reputation:
Rep Power: 2
Solved Threads: 0
Hi.
I am having a problem.
I have created .TLB type library in c#. in my c# application i have decalred two functions which returns string and string array respectively.
Now, i am importing the type library into vc++ 6.0 application.
i have created the interface pointer and using that pointer i am accessing the functions in that interface.
I am getting first character of the returned string when i call that function.
for eg.
BSTR myArr;
HRESULT hr = ptrInterface->getString(&myArr);
in myArr i am getting only first char of entire string, so how to get entire string?
In second senario, my code is
SAFEARRAY * arr;
HRESULT hr = ptrInterface->getArray(&arr);
i am getting some address in arr but coulden't get the values in the returned array.
So can you please tell me solution for above problems with sample code????
thanx n regards.
chaitanya.
I am having a problem.
I have created .TLB type library in c#. in my c# application i have decalred two functions which returns string and string array respectively.
Now, i am importing the type library into vc++ 6.0 application.
i have created the interface pointer and using that pointer i am accessing the functions in that interface.
I am getting first character of the returned string when i call that function.
for eg.
BSTR myArr;
HRESULT hr = ptrInterface->getString(&myArr);
in myArr i am getting only first char of entire string, so how to get entire string?
In second senario, my code is
SAFEARRAY * arr;
HRESULT hr = ptrInterface->getArray(&arr);
i am getting some address in arr but coulden't get the values in the returned array.
So can you please tell me solution for above problems with sample code????
thanx n regards.
chaitanya.
![]() |
•
•
•
•
•
•
•
•
DaniWeb C# Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Similar Threads
- Mapping a drive between WinXP VMware host and Win98SE guest? (Windows NT / 2000 / XP / 2003)
- Multidimensional array list & foreach? (C#)
- Coverting a string to a byte array (Visual Basic 4 / 5 / 6)
- Parse XML from ASP!!! (ASP)
- Index array & sort algorithm??? (Java)
- Safe Array (C++)
- Advantages of C++ SAFEARRAY: Explain (C++)
- Array (Visual Basic 4 / 5 / 6)
Other Threads in the C# Forum
- Previous Thread: Need Help with mean and variance
- Next Thread: class creation and object creation...


Linear Mode