tags:

views:

336

answers:

3

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

+2  A: 

Regsvr32.exe


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=207132

For more info on shellExecute() refer:
- http://msdn.microsoft.com/en-us/library/bb762153%28VS.85%29.aspx

GoodLUCK!!

CVS-2600Hertz
hii use this codeint x = (int)ShellExecute(NULL, NULL, "C:\\WINDOWS\\system32\\regsvr32.exe", "/s <swf-ocx-file.OCX" , NULL, SW_SHOWNORMAL);but ocx file did not register and i can't use swf file please help methanks
hadi
plz remove the <swf-ocx-file.OCX>. Those were place holders. Use the full path of the ocx file in its place. For example "D:\\project\\swf.ocx"
CVS-2600Hertz
A: 

You may do this manually using this instruction from Microsoft.

J-16 SDiZ
A: 
hadi