PDA

View Full Version : Can't load o register OCX problem...



NewsArchive
08-28-1997, 12:00 AM
Hi:

I have a vb application and I'm getting a 'Can't load o register OCX
problem...' when running the application that was installed using
IS1. Any advice ?

Thanks in advance

ricardo
ricgomez@uniandes.edu.co

NewsArchive
08-29-1997, 12:00 AM
Ricardo,

The .ocx was probably not registered. Check the registry to see if
the .ocx registered. Enclosed is the information which may help in this matter.

----------------------------------------------------------------------------------------------------
---------------------
ISSUE:
----------------------------------------------------------------------------------------------------
---------------------
How can I have the .dll, .exe, .ocx and .olb files in my setup automatically registered on the
target system?

----------------------------------------------------------------------------------------------------
---------------------
DISCUSSION:
----------------------------------------------------------------------------------------------------
---------------------
All editions of Express automatically register any .dll, .exe and .ocx file containing the
"OLESelfRegister" string in the version resource. (Note: The 1.1 version of Express Professional
will also check .olb files for the "OLESelfRegister" flag.)

You can check to see if a third-party .ocx or .dll file contains this resource by opening the .dll
or .ocx file using Borland Resource Workshop or MSVC++ and then checking the 'Version Information'
resource for the following value:

VALUE "OLESelfRegister", ""

To include this resource in your own DLLs, create an extra string value field in the version
resource for the .dll/.ocx file. This value should have the name OLESelfRegister. The data for this
value is ignored and can be set to "".

MSVC++ does not currently allow you to add a new value field to the 'Version Information' resource.
If you are using MSVC++, you will need to add this value directly to the .RC file for your project.
You can use any convenient text editor to edit this file and add OLESelfRegister to the existing
values in the .RC file. Make sure you rebuild your .dll/.ocx file after making this change.

After you add this string, the version information block will look something like this:

/////////////// Begin sample

VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,0,1
PRODUCTVERSION 1,0,0,1
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x2L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "InstallShield\0"
VALUE "FileDescription", "RESDLL\0"
VALUE "FileVersion", "1, 0, 0, 1\0"
VALUE "InternalName", "RESDLL\0"
VALUE "LegalCopyright", "Copyright _ 1996\0"
VALUE "OriginalFilename", "RESDLL.dll\0"
VALUE "ProductName", "InstallShield RESDLL\0"
VALUE "ProductVersion", "1, 0, 0, 1\0"
VALUE "OLESelfRegister",""
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END

/////////////// End sample

In InstallShield Express Professional, you can also manually add the following section to the
Swdepend.ini file used for the installation:

[DLLNAME.DLL]
Register=$(DLLSelfRegister)

This Swdepend.ini file will be located in a subdirectory under the directory in which you installed
Express (for example, if you are creating a Visual Basic application setup, this file will be under
the path ..\Program Files\InstallShield\IS Express Pro\OBJS\VB4\). If the Swdepend.ini file already
contains a section named after your file, you must add the "Register=$(DLLSelfRegister)" line to
the existing section.

Please note that this workaround does not work in Express Custom Editions.

(Note: You must also check an .ocx file's documentation for any dependencies that this file may
have. Any files required by an .ocx must be added to a file group in your Express setup before the
...ocx file itself, as these files will be registered on the target machine in the order in which yo
have included them in the Groups and Files dialog. An .ocx file will not be successfully
self-registered unless the .dll files it requires are already registered on the target system.)

----------------------------------------------------------------------------------------------------
---------------------

----------------------------------------------------------------------------------------------------
---------------------
ISSUE:
----------------------------------------------------------------------------------------------------
---------------------
My dll, ocx, exe, olb is failing to self-register. How can I troubleshoot this occurrence?

----------------------------------------------------------------------------------------------------
---------------------
DISCUSSION:
----------------------------------------------------------------------------------------------------
---------------------

Make sure the file can be manually self-registered using Regsvr32.exe or some other
self-registration tool.
If the file has dependencies, the dependencies need to be registered before the file
itself is registered. If a file fails to self-register with Express, delete the file from the
Groups
and Files and add it again. This will cause the file to be self-registered as the last file in the

install.
----------------------------------------------------------------------------------------------------
---------------------

Express 2.01 displays a message box if a file was not self-registered which is not the case
in 1.x versions of Express.

Dan

Ricardo Gomez <ricgomez@uniandes.edu.co> wrote in article <3405F760.5C7B@uniandes.edu.co>...
> Hi:
>
> I have a vb application and I'm getting a 'Can't load o register OCX
> problem...' when running the application that was installed using
> IS1. Any advice ?
>
> Thanks in advance
>
> ricardo
> ricgomez@uniandes.edu.co
>