|
pther wrote: Is this Correct?
Yes, the tricky handling of interface reference count for such objects must be handled by the COM server (i.e. your TopObject).
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
Consider an MFC Activex control, Example, Vehicle,
Following are the interfaces,
_DVehicle , _DVehicleEvents - Default interfaces.
ICar - Custom interfaces.
The default interface (_DVehicle) returns pointer to ICar interface for accessing the ICar methods/properties.
1. Now , I need to add new methods/properties/Events to the above
interfaces. Since modifying the existing interfaces is against the rules,
How do I go about it?
2. If I write a new interface ICar2, then what will happen to the old
applications that are using old interface ICar ? How will the default (_DVehicle) interface decide which interface pointer it should return?
3. How do I add a new Event Interface?
4. What is the purpose of changing type library version. If I add a new
interface then do I have to change the major version of the type library (Ex:
1.0 - 2.0) ?
|
|
|
|
|
Sir,
My COM class not getting registered.
Iam trying to register the COM DLL with .regsvr32.
It is not displaying either Dll Registered or Failed messge.
So, when i try to create instance of thet class, using CoCreateInstance
it returned Failure Code -2147221164 , that means Class not registered.
I want to know the reasons of CoCreateInstance failure.
Help me Plz.
Krishna.
|
|
|
|
|
Are you using /s ?
Usage: regsvr32 [/u] [/s] [/n] [/i[:cmdline]] dllname
/u - Unregister server
/s - Silent; display no message boxes
/i - Call DllInstall passing it an optional [cmdline]; when used with /u calls dll uninstall
/n - do not call DllRegisterServer; this option must be used with /i
---------------------------
OK
---------------------------
Following might help for error messages
http://support.microsoft.com/kb/249873[^]
Sohail
modified 21-Apr-21 21:01pm.
|
|
|
|
|
Iam able to register my DLL After small modification in project settings.
I removed _WinmainCrtstartup in Entry point symbol tab.
|
|
|
|
|
Hi,
My dev environment is VC++ .NET 2005 with MFC.
So here's the deal:
From my main application, I load up a number of dlls as COM objects with CreateInstance.
- These dlls are all registered.
- Everything works perfectly when the dlls are compiled in debug mode.
- When the dlls are compiled in release mode, CreateInstance fails to load one of the dlls from my main application, returning error -2147221164, CLASS_NOT_REGISTERED. This only happens with one dll - if I replace that dll with a debug version of the same dll, everything works fine.
I don't have any #ifdef _DEBUG sections in the dll code.
Has anyone seen this before or know what might be wrong?
KR
|
|
|
|
|
Hi Kelly, iam also facing same problem.
My CoCreateinstance is failed to return correct pointer. It is just retuned the error code -2147221164.
I dont know what to do....
Please advice us to resolve this problem.
|
|
|
|
|
KellyR wrote: I don't have any #ifdef _DEBUG sections in the dll code.
And haven't you ASSERT at all (or have you only harmless ASSERT, i.e. without meaningful code inside)?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
The only asserts I have are ASSERT(0).
KR
|
|
|
|
|
Have a look at http://www.flounder.com/debug_release.htm[^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
Can I pass the registry key directly into CreateInstance instead of using a CLSID? How would I do that? I have the registry key as a string but I can't find a way to convert that string to a CLSID or pass it to CreateInstance.
Thanks!
KR
|
|
|
|
|
Could you show me your code?
|
|
|
|
|
Well it's just a CreateInstance call with a CLSID. It's like this:
m_Server.CreateInstance(SERVERLib::CLSID_Server);
And the CLSID passed into the function is correct in both debug and release versions. The dll is registered, I just don't understand why it won't load in release mode.
KR
|
|
|
|
|
I think you need to have the MFC Dlls for VS2005 in the system where you are testing the app.
However if you are testing it in the same system where VS 2005 is installed there is some other problem
"Every morning I go through Forbes list of 40 richest people in the world. If my name is not in there, I go to work..!!!"
|
|
|
|
|
Hi All,
I implemented a C# class library and registered it to be visible for COM objects, then i used it from VB6 application and it works fine. Now the problem is that i want to raise an event in the .NET COM and pass it as an event in VB6. i.e. when the .NET COM catched an exception i want it to raise event in the VB6 application to log the event (because the logger works there). Any ideas?
Thanks,
Mayy
|
|
|
|
|
MSDN[^]
Sohail
modified 21-Apr-21 21:01pm.
|
|
|
|
|
I'm stuck on the same thing right now. I think one option is to look up design patterns read up on the "Sender Observer Model" it will allow you to trigger a subroutine on the VB form and pass it arguements as well.
This will give you the same effect but it's not really answering the question I know. It is an alternative though.
Many Thanks,
Kiran
|
|
|
|
|
I have application developed in VC/COM/DCOM
At some point of time i got the following error message and application closed.
Faulting application <application name="">, version <version number="">, faulting module <module name="">, version <number>, fault address <hex address="">
Under what scenario does the above error occurs?
|
|
|
|
|
nilam2477 wrote: Under what scenario does the above error occurs?
Yours.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
[my articles]
|
|
|
|
|
Hi All
I want to integrate an “.exe” program in my application (C# Application) but I don’t know how to do that!
The .exe program is a decryption program that needs a password to decrypt files.
Also if it’s possible that I send directly the output (decrypted file) into my application not into a file.
Regard.
|
|
|
|
|
Does this 3rd part app provide COM interop? If so, read it's documentation and do what it says.IF not, I'd suggest you look at the Process class. If you need anything beyond command line interfacing though you're SOL using it.
Otherwise [Microsoft is] toast in the long term no matter how much money they've got. They would be already if the Linux community didn't have it's head so firmly up it's own command line buffer that it looks like taking 15 years to find the desktop.
-- Matthew Faithfull
|
|
|
|
|
Hi to all,
I created wrapper for the activex control created in vb
by aximp
i run aximp socx.ocx
socx is the name of my active x control.
Then i got two dll AXSOCXLIb and SOCXLib
i added to my .net 2003 reference folder then
i create object
Public X1 As New SOCXLib.SOCXClass
and pass all parameter to one of the method that is
str = gOutgoingNo & Trim(txtDialNo.Text)
g_NewCallRefID = 0
ip_addr = "130.1.12.21"
extn = 3308
X1.SCTMakeCall(str, "", g_NewCallRefID)
i got all the parameter but on last statment
when he call SCTMakeCall method i got
System.Runtime.InteropServices.COMException: Catastrophic failure
This is very urgent
please help me
|
|
|
|
|
Don't cross post. That is frowned upon, as well.
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
|
|
|
|
|
Hey everybody!!
I need to know if the Document property of the WebBowser control (used by Internet Explorer) returns also the DOM elements created dynamically via Javascript or just the static ones defined on the page.
If anybody knows something about this, or has used the control and can give a hint on this, I will really appreciate it. Any ideas are welcome.
Thanks in advance,
Best regards,
Kenia
|
|
|
|
|
sorry... but why not simply test it yourself?
|
|
|
|