|
Hello,
It is strange to see that you have 1 active X control, that has to be installed 3 times and has different behaviour depending on the order in which they get loaded.
I find this strange, since you as a developer has absolutly no idea what happens when you load the component during the development stage. You cannot depend on certain behaviour since it might be different during every startup.
If you still think that this is the way to go, you can consider hiding the behaviour behind the control. Make 3 classes that have the different behaviour and you can use shared memory / registry / mutex / ... to determine what class has to be instantiated at startup.
Hope this helps
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|
|
I am not allowed to explain anything more than this, Leave it plain as it is, please tell me how to change the uuid of an activex object, will you please?
|
|
|
|
|
Hello,
There is no need to explain more on this. Given the provided information, I drew a conclusion and offered you a possible solution. You should decide (or talk to one who can decide for you) if that solution should be implemented or not. My objective was to make you think about an other solution, which is IMHO more subtle than 3 different UUID, which has to be carried around. The way I see it, is that you expose implementation details which should be hidden from the user.
Anyway, I don't know how to change the UUID of an ActiveX control.
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|
|
Aljechin Alexander wrote: How to change the UUID of an ActiveX Control?
Bob Stanneveld wrote: Anyway, I don't know how to change the UUID of an ActiveX control.
|
|
|
|
|
Aljechin wrote: If i tell you why can you please give me the solution
I honestly do not know how to do it, since I do not have any experience with such controls. I only wanted to point out that it may not be a good idea to have three times the same component with three different ids, for an UUID should represent some ... unique entity.
~RaGE();
|
|
|
|
|
That would depend of how the ActiveX control was written. If it's in ATL you would change the IDL and RGS files then recompile. Can you give more info?
Steve
|
|
|
|
|
No ATL. It is a MFC Project, final output is an OCX
|
|
|
|
|
Change GUIDs in:
- The .ODL file; and
- Type library ID in the Project.cpp file (to match change in the .ODL file); and
- Class and interface IDs in the ProjectCtl.cpp file.
To make things worse you'll have to break up the GUIDS with commas; follow the existing pattern. I find ATL more civilized for most of my COM work.
I suspect that there may be a more elegant way of solving your problem then duplicating the control with different GUIDs (or am I misunderstanding you intentions here?).
Steve
|
|
|
|
|
change the UUID of Interface in Project.idl and interface.rgs file. please note you have diffrent .rgs file for diffrent interface you exposed through the Component
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Thank you so much, I will try this.
|
|
|
|
|
Where can I find this IDL file and RGS file? can you please tell me? It's not in the project directory. There is one .ODL file only.
|
|
|
|
|
Aljechin wrote: There is one .ODL file only.
yeah, try you hand on ODL file then
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
please help me.....ASAP
i have to make a application which fetch data from other machine so i have make application which transfer messeges between two machine but i want total data at client side .
id:bankey.khandelwal@solversa.com
Thanks N Regards
Bankey Khandelwal
Mobile : 98504-32990
Office : 020 25521888
Solversa Technologies
15, Yeshwant Ghadge Nagar,
Range Hill Road,
Pune - 03,Maharashtra,India.
|
|
|
|
|
Bankey Khandelwal wrote: please help me.....ASAP
That is what the forum is for.
Bankey Khandelwal wrote: i have to make a application which fetch data from other machine so i have make application which transfer messeges between two machine but i want total data at client side .
That is what the forum is not directly for (provide complete solutions). Try and google for socket, client, server or something in this taste, or even search on Code Project using the search functionality at the top of this page.
~RaGE();
|
|
|
|
|
Write a COM (DCOM) object.
Steve
|
|
|
|
|
Bankey Khandelwal wrote: i have to make a application which fetch data from other machine so i have make application which transfer messeges between two machine but i want total data at client side .
http://www.codeproject.com/internet/#Client%2FServer+Development[^]
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Hi,
I am woking on VC++ project. When I run the project in Release mode, I am getting R6025 Runtime error message. The project has hundreds of virtual functions not written by me and I have no clue as to find out from where this message box is coming? If I run in debug mode, I am not getting this error message box. If I try to debug in release mode, I am still not getting this error message. Can anyone please guide me as to how to trace out the cause for thsi problem?
Thanks
Madhavi
|
|
|
|
|
|
As you're probably aware, this means that you called a pure virtual function. At first sight this seems impossible - But it is not. What's more, in general, such errors can't be caught at compile time. Here is some code that shows how this can happen:
#include <iostream>
using namespace std;
class Base
{
public:
virtual VirtualFunction() = 0;
};
void UseIt(Base *pBase)
{
pBase->VirtualFunction();
}
class Base2 : public Base
{
public:
Base2()
{
UseIt(this);
}
};
class Derived : public Base2
{
public:
Derived()
{
}
virtual VirtualFunction()
{
cout << "Derived::VirtualFunction\n";
}
};
int main(int argc, char* argv[])
{
Derived d;
return 0;
}
It happens because you are calling a virtual function in a function that is called from a constructor (and the object is partially constructed).
To debug it I would launch it in the debugger and when the error dialog appears break and look at the call stack. If it only happens in a release build, build a release build with debug info and follow the procudure above - Debugging with a map file isn't needed when you do this, it's the hard way.
Steve
|
|
|
|
|
Hi Stephen Hewitt,
Thanks for your help. I understood the concept here.. I went through the aricle available at:
|
|
|
|
|
Hi ,
Thanks for your help..I understood the concept here.. The problem is that there are hundreds of virtual functions in the project that are not written by me and moreover I get this exception only in release mode. If I run the application in release with debug information, I am still not able to reproduce this exception. So is there any way to find out from where this exception is coming while running in release mode?
Thanks
Madhavi.
|
|
|
|
|
Building a release build with debug info will not alter the way the application behaves. To turn on debug info for the release build follow these steps (VC6):
- Select the release configuration as the active config.
- Project settings, "C/C++" tab, "General" category: Select "Program Database" in the "Debug Info" combo.
- "Link" tab, "Debug" category: Tick "Debug info", "Microsoft format" & "Separate types".
- Rebuild.
If your workspace contains multiple projects follow the same steps for each one. Run the application in the debugger (still the release build however) and reproduce the problem. When the error dialog appears break in and look at the call stack. You may have to hunt for the correct thread.
Because optimizations are enabled your debugger will "lie" to you from time to time (when some optimization trips it up) so beware.
I actually always follow these steps for release builds. Having the .PDB files has many benefits such as simplifying postmortem analysis with crash dump files. In a production environment you should have a symbol server on the build machine and the .PDB files get added to the symbol server as part of the build process.
Steve
|
|
|
|
|
Hi,
Thanks for your reply..
This crash occurs only in release mode. It does not occur If I set the bebug information(i.e Link->GenerateDebugInfo settings ) in release mode. Moreover this does not reproduce in release mode always..It comes up some times only..i.e I don't have the steps for repeating this error. Hence I don't think it is problem with virtual function call. If it was a problem with virtual function call, I should be able to reproduce this error always in both debug and release builds ..right? Is there any other reason for this error message? Do my Link options of Project settings have any impact on this error? My link options are: CTS32D.LIB RTS32D.LIB TAPI32.LIB VERSION.LIB WINMM.LIB VFW32.LIB..
Please let me know if you have further inputs on this as I am not getting any clue for resolving this issue..
Is there any tool that can catch and take us to the code that is creating these runtime errors..
Thanks..
Madhavi..
|
|
|
|
|
Hi All,
I would like to know whether DiectX 9 supports vc++6? Moreover I'd also like to know the best books available in the market for DirectX9.
Thanks in Advance
Rajeev
|
|
|
|
|
i need a simple doc/view architecure
example,
just want to clear up fundamental
Vikas Amin
Embin Technology
Bombay
|
|
|
|