how can i find that ocx file (swf ocx flie) is registered or no?
and if is registered wich version is that?
and if is not registered how can i register taht?
Please help me
very thanks
how can i find that ocx file (swf ocx flie) is registered or no?
and if is registered wich version is that?
and if is not registered how can i register taht?
Please help me
very thanks
If you'll check the registry
HKCR\CLSID{guidInQuestion} you can determine if the OCX is registered.
To determine the GUID for your OCX:
Open the OCX with OleView.exe (program-Files\Visual-studio\Tools)
You will see something like -
// Generated .IDL file (by the OLE/COM Object Viewer)
//
// typelib filename: COMDLG32.OCX
[
uuid(F9043C88-F6F2-101A-A3C9-08002B2F49FB), version(1.2),
helpstring("Microsoft Common Dialog Control 6.0 (SP3)"),
helpfile("cmdlg98.chm"),
helpcontext(0x00030d40)
]
Check if the GUID you obtained for your OCX exists in the registry.
Use these functions to access the registry in code.
RegOpenKeyEx() &
RegQueryValueEx()
More info on them here (code sample)
You can use the Microsoft Register Server (Regsvr32.exe) to register a 32- bit .ocx file manually.
Regsvr32 /s <swf-ocx-file.OCX>
To execute Regsvr32.exe from code:
int x = (int)ShellExecute(NULL, NULL, "C:\\WINDOWS\\system32\\regsvr32.exe", "/s <swf-ocx-file.OCX" , NULL, SW_SHOWNORMAL);
For more info on Regsvr32.exe refer:
- http://support.microsoft.com/kb/146219
- http://support.microsoft.com/?id=207132For more info on shellExecute() refer:
- http://msdn.microsoft.com/en-us/library/bb762153%28VS.85%29.aspx
GoodLUCK!!