|
DaveC426913 wrote:
"WMSServer.Server" is an invalid ProgID. Should it be the GUID?
Nah. ProgIDs and CLSIDs (Class ID which is a GUID), are mostly interchangeable. GUIDs are unique, but ProgIDs aren't [edit]necessarily, but are most of the time. (I have yet to encounter two identical ProgIDs for different components!)[/edit]
What the error says is that the component isn't registered on your computer. Not as implementation nor as proxy. You need to investigate further on that.
-- modified at 1:53 Tuesday 30th August, 2005
|
|
|
|
|
"What the error says is that the component isn't registered on your computer. Not as implementation nor as proxy. You need to investigate further on that."
Would that be on the server wherer the service is, or on the client where the app is running?
It's got to be registered somehow - it is already in use when I started developing on these boxes.
________________________________________________________________________
Dave
Y10K bug! Let's not get caught with our pants down **AGAIN**! (DC 02002)
|
|
|
|
|
Hi,
I want to know whether there is any API to show Bitmaps of Registered ActiveX Controls in a ToolBox. If not , any idea on how to go about...
|
|
|
|
|
Last time I checked, I could not find one. I used the registry to extract that information.
Good music: In my rosary[^]
|
|
|
|
|
can you just code it in brief on how to show bitmaps from registry.
This is useful to me since i have no idea on how to do it.
|
|
|
|
|
The components registry "folder" is located in HKEY_CLASSES_ROOT\CLSID\{<clsid here>}.
Under that key is the ToolboxBitmap32 key. The default value of that key is the toolbox bitmap. The string value is on the form module,id. Parse the module and id into their own variables.
Then open the module using LoadLibraryEx(), using the LOAD_LIBRARY_AS_DATAFILE option. Then use the function LoadBitmap with the handle returned from LoadLibraryEx(), and the id "transformed" with MAKEINTRESOURCE().
Pseudo-code:
LPCTSTR lpszToolboxBitmap32 = GetToolboxBitmap32ForCLSID(clsidOfComponent);
LPCTSTR lpszModule;
int nId;
ParseBitmapString(lpszToolboxBitmap32, &lpszModule, &nId);
HMODULE hLibrary = ::LoadLibraryEx(lpszModule, NULL, LOAD_LIBRARY_AS_DATAFILE);
HBITMAP hBmp = ::LoadBitmap(hLibrary, MAKEINTRESOURCE(nId));
::FreeLibrary(hLibrary);
I hope this helps.
Good music: In my rosary[^]
|
|
|
|
|
Thanks for the Solution,
One problem how can i pass handle of bitmap to object of CBitmap.... or is there any other way of using it....
HBITMAP hBmp;
hBmp = ::LoadBitmap( hLibrary, MAKEINTRESOURCE(nID) );
//! Here LoadBitmap Accepts HICON & CBitmap*...but not HBITMAP..So how can I pass HBITMAP to CImageList so that it can be attached to CToolBar
CBitmap obBitmap;
obBitmap.LoadBitmap( hBmp ); //error...how to pass hBmp
CImageList obImageList;
obImageList.Create(18,18,ILC_COLOR8,2,1);
obImageList.Add( &obBitmap , RGB(0,0,0));
CToolBar obToolBar;
obToolBar.GetToolBarCtrl().SetImageList(&obImageList);
-- modified at 7:43 Thursday 1st September, 2005
|
|
|
|
|
CBitmap is just a C++ wrapper for HBITMAP. Use CBitmap::FromHandle() to acquire a CBitmap object. It returns a CBitmap*, but you don't have to free it. The returned pointer is a pointer to a temporary object, which is removed next time the window pump is idling. So in short, use the pointer on the same call stack as you acquired it. Please see the MSDN docs for a more comprehensive explanation.
Good music: In my rosary[^]
|
|
|
|
|
Thanks for the reply .... it worked out..
Now the major task for me after showing bitmaps of controls on toolbox is enabling drag 'n' drop facility of controls onto the container. I think IDesignerToolBoxSite interface is used for this. But how to use this interface in my application is what is troubling me?
Can u help me in this regard?
|
|
|
|
|
hi
I am having problem in callling remote components methods..I tried for the same but was tnot sucessful
Any kind of help is appreciated
cheers
|
|
|
|
|
What problem are you facing?
What type of component is it? (Dll or Exe)
Did you build the proxy and registered the same?
|
|
|
|
|
Hi all,
I have just written a VC7 program which uses ATL & COM. It is giving the following linker errors :
nafxcwd.lib(thrdcore.obj) : error LNK2019: unresolved external symbol __endthreadex referenced in function "void __stdcall AfxEndThread(unsigned int,int)" (?AfxEndThread@@YGXIH@Z)
and
nafxcwd.lib(thrdcore.obj) : error LNK2019: unresolved external symbol __beginthreadex referenced in function "public: int __thiscall CWinThread::CreateThread(unsigned long,unsigned int,struct _SECURITY_ATTRIBUTES *)" (?CreateThread@CWinThread@@QAEHKIPAU_SECURITY_ATTRIBUTES@@@Z)
Can anyone tell why are errors ocurring and how to resolve them?
Thanking You.
Regards,
Harshad
|
|
|
|
|
guys
i have been asked to convert a simple dll that is called from vb into an activex that can be used directly in vb... the dll has only 2 functions and no gui of any kind... it doesnt use mfc or atl
what would be the best way to go about doing this for someone who hasnt done any com programming in a _very_ long time?
thnx
"there is no spoon" biz stuff about me
|
|
|
|
|
I would create a new DLL project, based on the ATL/DLL wizard template. Then I'm assuming that you want to encapsulate the original two functions, into a COM class, which you can instantiate and use from within VB. Simply create a new class in VS.NET by right clicking the project in the solutions view, and chose Add -> Add Class, and then pick ATL Simple Object.
In the ATL Simple Object Wizard, enter a name for the class, and hit OK. The default options will do just fine, unless you're doing something fancy with your apartments. You might want to turn on IErrorInfo-support if you want to provide error messages when you return error codes from your COM methods.
Anyway, when you're done, add your two functions to the interface that was created alongside your class. You'll find it in the class view. As you add interface members through the GUI in the class view, all related files will be updated (including .idl, .h and .cpp files). Then you just fill in the blanks (which is presumably the content of your two functions).
Good music: In my rosary[^]
|
|
|
|
|
thnx jorgen
is there anything different to do if i dont have vs.net? i have vc6
|
|
|
|
|
No difference. Well, obviously the IDE menus and wizards will be different, but the concept's still the same. I'm not sure if the IDE will update all related files, if you add an interface method using a wizard though.
By the way, make sure you label your parameters with [in], [out], [out, retval], etc, where appropriately. I know VBScript will barf if you miss such a parameter attribute, and I suspect VB will too.
Good music: In my rosary[^]
|
|
|
|
|
|
ok... i hate doing this 2u but i get:
Linking...
Creating library Debug/ax2.lib and object Debug/ax2.exp
uuid.lib(cguid_i.obj) : fatal error LNK1103: debugging information corrupt; recompile module
Error executing link.exe.
every time i try to compile the damn thing
any clue what this could mean?
"there is no spoon" biz stuff about me
|
|
|
|
|
I really don't know what's wrong. It looks though as if uuid.lib is corrupt. Have you tried replacing it from another VC6-install?
Good music: In my rosary[^]
|
|
|
|
|
u prolly dont use vc6 anymore so its irrelevant but just in case i found this and it worked ... thnx 4 the heads up
Using VC6 you may encounter the following error :
uuid.lib(unknwn_i.obj) : fatal error LNK1103: debugging information corrupt; recompile module
This error is caused by an incompatibility between the XPSP2 platform SDK and VC6.To solve this issue, use February 2003 platform SDK (and not XPSp2 Platform SDK)
DX9c October edition with extras (d3dx9.lib etc) (not december edition)
This problem can also be solved by renaming the uuid.lib file of the XPSP2 platform SDK to uuid.was_a_lib to disable it.
"there is no spoon" biz stuff about me
|
|
|
|
|
Hi
I have created the COM component. and in thati haev a one more class which is dericed from CSocket.
Ebery thing works fine , But the problemis when i connect the Client socket to server in interface from interface method. i want the value to be set . I haev created the extern variable nad have set it in Socket's receive function.
But when i call the interface method value set is different because at that time client is connected and the function scope is over and then the value is set in receive functiono Client Socket . how cani manage this
cheers
hi
|
|
|
|
|
Hello All,
Does anybody know how to find out interfaces exposed by a driver (.sys file)?
Thanks in advance
|
|
|
|
|
hi! Can anyone suggest a good project topic for DCOM, distributed processing system?
|
|
|
|
|
I have App.exe which uses Dll.dll, I also add classical Microsoft manifest file App.manifest.exe to enable XP styles for common controls.
Now question how can I disable influence of manifest on Dll.dll
Which means I want that App.exe continue to use
comctl32.dll (ver 6) new one
but
Dll.dll should use
comctl32.dll (ver 5) old one
Load / Unload library - already try not helps
#define/#undefine IE_CONTLOLS - already try doesnt helps
I need to customize body of manifest somehow include or exclude styles in the dependency section
Thanks.
|
|
|
|
|
I'm trying to add a button on the standard toolbar of IE. This button can access the HTML Object Model of web page in current IE window. To create a button on IE toolbar, I created a com object which implements IOleCommandTarget. To get access to the IHTMLDocument2, I created a com object which implements IObjectWithSite.
When there are multiple IE instances, I keep all the IObjectWithSite instances in a static ArrayList. So the IOleCommandTarget.Exec function can get access to the IHTMLDocument2 instances for each web page through this static ArrayList.
Each IE window has a added button. When the user clicks the added button in IE, I only want to access the HTML object model in the current IE window (The IE window whose button is clicked) rather than all the HTML object models in every opened IE windows. Now here comes the problem. In IOleCommandTarget.Exec function, I have no way to distinguish which IObjectWithSite instances is associated with the current IE window.
To better explain my problem, I pasted the link of the original code and article that my code tries to simulate. The original code doesn't encounter my problem because it actually process every IObjectWithSite instances through the static ArrayList.
http://www.codeguru.com/Csharp/.NET/net_general/article.php/c4671/#more[^]
I really appreciate it if anyone can point out a solution for my problem. By the way, I'm using C#.
|
|
|
|