The following tips and hints are provided to assist you in trouble-shooting.
Verify that the part DLL is loadable. Check that the part DLL and all the DLLs loaded by the part DLL can be loaded.
Verify that the part has been registered in the PartReg.bto file. Use ODDumpRg to list all the registered parts.
Verify that another IR file listed in SOMIR is not corrupted. From a command window, set the SOMIR environment variable to only include the ...\etc\opendoc.ir file.
If other parts can install, check the Meta information in the part's source file. This information includes the Part's Class name, DLL name, Part Kind name, and so on. See the samples provided in the OpenDoc Programming Guide for addtional information.
Ensure that your part source includes a SOMInitModule. Refer to the samples provided in the OpenDoc Programming Guide for additional information.
Your machine SOMIR environment variable must include the opendoc.ir as illustrated in the following example:
SOMIR=c:\opendoc\etc\opendoc.ir
Ensure that your part IDL file is in the opendoc.ir. To verify, enter:
irdump mypart_classnamewhere mypart_classname represents the class name of your part.
If irdump returns the following:
"mypart_classname" not found.you must reinstall the part.
The following environment settings are required for OpenDoc:
SET ODBASE=c:\opendoc SET ODCFG=c:\opendoc\etc SET SOMIR=c:\opendoc\etc\opendoc.ir SET HELP=c:\opendoc\locale\en_US SET NLSPATH=c:\opendoc\locale\en_US\%N;The settings assume that OpenDoc was installed at c:\opendoc, and that the language is English (en_US). Note that AIX uses EXPORT instead of SET.
More environment settings are required for OpenDoc Parts. Refer to the OpenDoc Programming Guide , Appendix C, Dynamic Binding under Installation of OpenDoc Software for more information.
Your OS/2 machine's LIBPATH environment variable must include the location of OpenDoc DLLs and your part DLL. If it is not specified, the part cannot run.
Your Windows NT/95 machine's PATH environment variable must include the location of OpenDoc DLLs and your part DLL. If it is not specified, the part cannot run. The PATH must also include the location of help files (.HLP files).
Your AIX machine's PATH environment variable must include the location of OpenDoc DLLs and your part DLL. If it is not specified, the part cannot run.
While testing your part, you could make changes to the part before rebuilding the DLL. In this case, you may see a message similar to the following:
ld: 0711-851 SEVERE ERROR: Output file: <your dll here> The file is in use and cannot be overwritten.
In AIX, DLLs stay mapped in memory. Enter the following as root:
> slibcleanThis removes the DLL mapping from memory and allows you to rebuild your DLL.
Path entries to directories that do not exist are not recognized and cause the user path to be dropped when your Windows NT system path is set at system startup. If you put an entry in your path that does not exist, the user path will not be appended to the system path when PATH is set.
This is true whether the entry that is not valid is at the beginning of the system PATH setting or at the end of the user PATH setting. Either way, the user portion of the path is not appended to the system path. This can occur if you include build directories that have not yet been created (that would be created by the build process).
When adding PATH entries, consider creating the directories at the same time, even though they are empty.
This section contains several scripting problems with possible causes and resolutions.
After you add your part into the form (either by an embedded OLE object or by adding a custom control) your part does not show up in the dialog box.
To resolve, run the odregprt command to register your part. For additional information about the odregprt command, see the OpenDoc Programming Guide .
To resolve, set the GUID correctly, rebuild your part, and redo the part registration.
To resolve, run the ctypelib command to create the TYPELIB, then run the scriptrg command to register the TYPELIB. For additional information about the ctypelib and scriptrg commands, see the OpenDoc Programming Guide .
Note:
This problem only happens when you add the part as a custom control. If you add your part as an embedded OLE object, you are not required to create a TYPELIB. Creating a TYPELIB for the OLE object can speed up your application.
You cannot create the custom control or the embedded OLE object after selecting the OK push button in the dialog box.
The odole.dll, oddsole.dll, or the .dll file of your part is not in the path, or an OpenDoc environment variable is not set correctly. To resolve, ensure that your part DLL files are in the path and set all OpenDoc environment variables correctly.
To resolve, ensure that your part can be embedded in another OLE container such as MicroSoft Word.
The event function prototypes do not show up in your code.
To resolve, set the event mechanism correctly in your IDL file and rebuild your part. For additional information on setting an IDL, see the OpenDoc Programming Reference .
To resolve, run the ctypelib command to create the TYPELIB and run the scriptrg command to register the TYPELIB. For additional information about the ctypelib and scriptrg commands, see the OpenDoc Programming Guide .
Note:
This problem only occurs when you add the part as a custom control. If you add your part as an imbedded OLE object, you are not required to create a TYPELIB. Creating a TYPELIB, can speed up your application.
When you run your application, it is receiving an OLE automation error.
To resolve, add the ODid modifier to the method or property of your IDL file and rebuild the part.
To resolve, ensure that your parameter number and parameter types are correct.
You did not set the ODGuid modifier or did not use the GUID in the meta data for the class. To resolve, put the GUID in the IDL file and the meta data for the class and rebuild the part.
To resolve, use the same GUID value in both places and rebuild the part.
To resolve, run the ctypelib command to rebuild the TYPELIB. For additional information about the ctypelib command, see the OpenDoc Programming Guide .
You did not update your Interface Repository file before creating the TYPELIB or before running the application (if you are not using a TYPELIB). To resolve, ensure the SOMIR environment variable is set correctly and run the irdump SOM utility to ensure that the latest changes are in the Interface Repository file. For additional information about the irdump utility, see the System Object Model Guide and Reference .
Your callback function is not being called.
To resolve, add the ODGuid modifier to the event class and rebuild the part.
To resolve, use the GUID for the event class when creating the event manager.
An application that worked previously is no longer working.
To resolve, rebuild the Visual Basic code and ensure that the PATH variable is set correctly.
To resolve, delete the embedded part from the form and embed the part again.