|
Oops..
You are right!
The documentation for CreateFile says that the dwFlagsAndAttributes argument is ignored on console objects.
|
|
|
|
|
Hi All,
Recently I tried to write a little player with the help of WMP10 SDK. To start with, I read the information provided from MSDN and try to follow the steps provide. Using the Windows Media Player Control in a C++ Program
All things work well until to the section of non-wrapper class, I find that when I copy and paste the code provided to have a test error reported.... would anyone mind to advise me on what I have missed? (For the wrapper class there is no problem ...)
Really thanks!;)
|
|
|
|
|
I have an ActiveX Component created with Visual C++ 6.0 and I need to change the UUID of the component. I know i can generate UUID with uuidgen.exe, but How will I change the UUID of the ActiveX Component? I searched the project for UUID and there are about 98 results, each a different uuid. How do I set the UUID of the ActiveX Component to something new?
Thanks and regards,
Aljechin Alexander
|
|
|
|
|
Aljechin wrote: I need to change the UUID of the component
Why would you do that ?
~RaGE();
|
|
|
|
|
If i tell you why can you please give me the solution? I have to install 3 copies of the same activex component in a machine, according to the order in which the 3 get loaded, they do a different task. But when the UUID are same, if i register one (after renaming it) it replaces the other one. Renaming is not enough, clearly i learned. So, how to change the UUID of an activeX component? I have generated 2 different ids with UUID gen. How to use it now?
Thanks and Regards,
Aljechin Alexander
|
|
|
|
|
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:
|
|
|
|