473,394 Members | 1,746 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Using VB COM object in VC++

Hi,

I have a COM object that I'm trying to use from within a VC++ dll. I'm
pretty sure that the COM object was written in VB although we didn't write
it. I registered the dll and have been able to successfully use it from
within a VB.NET program.

I need to be able to access it from within a VC++ dll that will end up being
an extended stored procedure. I've been able to get the dll loaded and
apparently executing but never returning anything other than a zero value to
the calling routines.

Any help on what I'm doing wrong is welcome.

Here's what the code looks like:

HRESULT hr = CoInitialize(NULL);
if ( FAILED(hr))
{ Return error }

_bstr_t bClr = "value B";
_bstr_t bPd = "Value C;

ICPSQLPtr pICPPd ( __uuidof( CPSQL ) );

VARIANT_BOOL retBool = pICPPd->ValueIsValid(bClr,bPd);

CoUninitialize();

The signature for the method in the class is ( _bstr_t, _bstr_t ) and
returns a VARIANT_BOOL as shown.

I'm passing values in that return a true value when the same COM object is
executed from a VB.NET program, yet I can not get anything other than a zero
to return back to the program.

Any hints?

TIA, Jim

Jan 13 '06 #1
0 905

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Anthony Gallagher | last post by:
I have a bunch of libraries compiled using VC++ 6.0, and I am trying to recompile one of our projects using VC++ .NET. I get all kind of linker errors (specially in STL calls). How do I get rid of...
3
by: Neil Guyette | last post by:
Hello, Everyone, I'm trying to find information on how to populate a combo box using a SqlDataReader. I want to be able to set the value of the combo's value property different then the...
5
by: AliR | last post by:
Hi Everyone, I have a Visual C++ MFC program, and I am trying to use a webservice written in C#. When I add the webservice to my project using Add Web Reference the sproxy compiler complains...
4
by: Praveen Chandra | last post by:
Hi, I just wanted to put down the issue with more detailed information so that you can help us get to the right Microsoft resource for a solution! Here is the problem description... Our...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.