PC Review


Reply
 
 
Al Pennyworth
Guest
Posts: n/a
 
      18th Mar 2005
I created a dll in .NET using C# and I need to call this dll from a
Visual C++ 6.0 application. I am programmatically calling the regasm.exe
as I am getting the installroot registry key, finding the folder, get
the exe, then doing a CreateProcess and it seems to function correctly.

My problem is in the call to the C# dll, after a couple of times, it
seems to GPF but the c++ 6.0 application continues to run w/o any
problems. I can continue to hit the button, launch the C# dll, when it
returns, it gets another GPF and the cycle goes on.

Here is a basic outline of my 6.0 c++ function:

void functionname
{
// Initialize COM.
HRESULT hr = CoInitialize(NULL);

// Create the interface pointer.
IManageInterfacePtr pIInterface(__uuidof(ManagerInterface));

// Call the Add method.
pIInterface->LaunchRSSDLL(string, string, string);

pIInterface->Dispose(); <--this is from trying something with the C# dll

pIInterface->Release();

// Uninitialize COM.
CoUninitialize();
}

I have put try/catch inside this function, around the call to this
function, inside my C# DLL COM interface, and I still cannot find where
the gpf is occurring. This is my first C# dll so be please be patient if
I so kind of idiotic in describing this. Any ideas on what I may be
missing? Any ideas on what I can look at? I have run out of ideas.


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
 
 
 
Al Pennyworth
Guest
Posts: n/a
 
      18th Mar 2005
This is not a GPF, it is an unhandled exception. I apologize for my
mistake.

I found the answer to my problem:

http://www.dotnet247.com/247referen.../35/178790.aspx

I removed the EnableVisualStyles() call from my .NET dll and the
unhandled exception has not been encountered.


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Interop.CDO uses Interop.ADODB which has a higher version... muriwai Microsoft C# .NET 7 27th Oct 2011 08:00 PM
Interop Ira Davis Microsoft Dot NET 1 29th Oct 2008 09:46 PM
Using .NET 1.1 via interop from .Net 2.0 schaf Microsoft C# .NET 0 9th Jun 2008 12:07 PM
Is there a published COM Interop Wrapper for Interop.MSDASC.dll? Burton G. Wilkins Microsoft ADO .NET 0 10th Nov 2003 01:57 AM
COM Interop Abhi Microsoft C# .NET 1 25th Sep 2003 08:41 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:40 AM.