oops sorry i didnt saw the importlib("..\Interfaces\Interfaces.tlb"); line, you should assert that MIDL can find the .tlb file
JO :)
oops sorry i didnt saw the importlib("..\Interfaces\Interfaces.tlb"); line, you should assert that MIDL can find the .tlb file
JO :)
You need to define your interfaces first with the associated uuid, fore example import "oaidl.idl"; import "ocidl.idl"; [ object, uuid(BB137454-1CB9-469b-A398-5BDB535A1920), dual, nonextensible, helpstring("IMyProjMessageInterface"), pointer_default(unique) ] interface IMyProjMessage: IDispatch{ [id(1), helpstring("method Foo")] HRESULT Foo(); }; [ uuid(71050F79-3FC6-4BCA-BC36-A79465500B71), version(1.0), helpstring("MyProj 1.0 Type Library") ] library MyProjLib { importlib("stdole32.tlb"); importlib("stdole2.tlb"); importlib("..\Interfaces\Interfaces.tlb"); [ uuid(83BC908B-C13C-4D6A-B290-C97057ACEBC4), helpstring("MyClass Class") ] coclass MyClass { [default] interface IMyProjMessage; }; };
JO :)
In c++ you got ATL wich is a good way for developing COM objects
JO :)
Try Using a COM Object to Wrap around your C++ methods and libraries. so you can adapt it to other systems
JO :)
Try this oldie good book about COM Developer's Workshop to COM and Atl 3.0, there are also many good articles here in CodeProject, but this book is a good introductory tutorial.
JO :)
Try regsvr -u vid_NET.ocx and if this fails you could delete the dll and use RegCleaner
JO :)
Maybe the interop file is corrupt so try 1) cleaning the entire solution and running again 2) Deleting the COM dlls references and objects from your vb proyect and putting them again.
JO :)
How About chinese ?
JO :)
Try installing the Microsoft Visual C++ 2008 Redistributable Package that installs and registers the dlls you need. If you are using additional COM components you should also register the associated dlls with regsvr32. C++ redist Link: http://www.microsoft.com/downloads/details.aspx?familyid=9B2DA534-3E03-4391-8A4D-074B9F2BC1BF&displaylang=en
JO :)
No, The dlls you should register in order to use them are the ones of you COM Components (i assumed you were developing COM somponent for the Forum name :D). You could Also check for missing dlls in you installation directory with the dependency walker, this little program checks yor .exe for missing dependencies so you could copy to the instalation dir the files missing (ie: msvcm90.dll, msvcp90.dll, msvcr90.dll ) You could download dependencywalker from: http://www.dependencywalker.com
JO :)
Ni Hao, To draw your control as transparent must Override the OnDraw() of the ActiveX. If you Do nothing there the control will never be written ad you should see what lies bellow it. Also you could use the function TransparentBlt() to draw any overlay you want. A third option could be capturing the screen below the control an drawing it (for avoiding the . HRESULT CCAxQuantMaster::OnDraw(ATL_DRAWINFO& di) { RECT& rc = *(RECT*)di.prcBounds; // Set Clip region to the rectangle specified by di.prcBounds HRGN hRgnOld = NULL; if (GetClipRgn(di.hdcDraw, hRgnOld) != 1) hRgnOld = NULL; bool bSelectOldRgn = false; HRGN hRgnNew = CreateRectRgn(rc.left, rc.top, rc.right, rc.bottom); if (hRgnNew != NULL) { bSelectOldRgn = (SelectClipRgn(di.hdcDraw, hRgnNew) != ERROR); } //Select Transparent Brush SelectObject(di.hdcDraw, GetStockObject(NULL_BRUSH)); Rectangle(di.hdcDraw, rc.left, rc.top, rc.right, rc.bottom); }
JO :)
You have to define a typedef for the enum. This should do the trick: typedef enum RPtrResolution{ RPTR_RESOLUTION_LOW, RPTR_RESOLUTION_MEDIUM, RPTR_RESOLUTION_HIGH, RPTR_RESOLUTION_VERYHIGH }RPtrResolution; [ Your Interface UID and etc... ] interface IXFSReceipt : IDispatch { HRESULT Resolution([out, retval] RPtrResolution* pVal); HRESULT Resolution([in] RPtrResolution newVal); }; Please tell me how it worked :)
JO :)
If you program an ActiveX you could capture both Events (but from the window of the Object)
JO :)
Hi, When you program COM components in C++ you genereally use ATL, wich helps you a lot to deal with the COM gore details. Since C# is a managed Language that runs over the .NET framework it was not designed to support COM developing which is an older unmanaged technology If you want to use COM components from you C# App I strongly recommend you to program them in C++ and loading them into your C# project. But you should first evaluate if its strongly necessary to use COM instead of a .NET component programmed in C#
JO :)
If you are working with COM you should check if the your custom COM Components dlls are being registered properly. You could make two scripts to do this, for exmple Reg.BAT regsvr32 ProcessLibrary.dll regsvr32 ProcessLibraryPS.dll UnReg.Bat regsvr32 /u ProcessLibrary.dll regsvr32 /u ProcessLibraryPS.dll
JO :)
When i said Coclass i was trying to say a COM Object or a C++ Object, so what i want to do, like you say is: having a property Frame of Reference which is an Object that has a property named Series named Series Which is an Object with an Item Methhod , the diffulty arises when i try to use properties which are objects. Especially with IDL. Do you know if i can use C++ objects as properties in ATL or i have to use COM objects, in that case which parameters i Have to use in the definition of the property in mi idl file? Thank you very much
JO :)
Hi, I am programming a COM object in C++, to be used in a Visual Basic Apllication. I want to know if there is a way to separate the interface members with namespaces like this Study.FramesOfReference.Series.Item() where Study is a COM Object that contains a CoClass FramesOfReference which Contains a CoClass Series wich has a method Item() Thank U very Much
JO :)
Hi, I am programming a COM object in C++, to be used in a Visual Basic Apllication. I want to know if there is a way to separate the interface members with namespaces like this Study.FramesOfReference.Series.Item() where Study is a COM Object that contains a CoClass FramesOfReference which Contains a CoClass Series wich has a method Item() Thank U very Much Juan
JO :)
You cant because the way COM operates. The matlab Client (COM VB Object) will allways referenciate to a Matlab Server. Maybe you can connect to a Matlab Server in another Machine but you will always depend on the runtime libraries because the server needs them.
JO :)
Check the DoxyGenerator that allows you to document your code with latex Entries. It Generates Automatically the htmls with the pngs that represents the equations
JO :)