ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  Object Not Initialize
Posted by krishma on Sep-26-2009 12:15
When i try to initialize the object of ChartDirector.API, I am getiing the below Error on first line.

error '8007045a'

My code is:

Set cd = CreateObject("ChartDirector.API")

  Re: Object Not Initialize
Posted by Peter Kwan on Sep-28-2009 21:26
Attachments:
Hi krishma,

The error message means your system is unable to create the "ChartDirector.API" object. This is usually because ChartDirector is not installed, or is not installed correctly, or the security settings of your system does not allow ChartDirector to be used.

Would you mind to confirm if you have installed ChartDirector using the "Administrator" account in your system?

If you are using ChartDirector in an IIS/ASP environment, may be you can try the following cdcheck5.asp script to test your ChartDirector installation. Please kindly let me know of the result, as well as the exact operating system you are using (eg. Windows 2000/2003/2008/Vista/7 and whether it is 32-bit or 64-bit).

Regards
PeteR Kwan
cdcheck5.asp
<%@ language="vbscript" %>
<%
path = Request("path")
displayPath = path
If path = "" Then
	displayPath = "c:\\Program Files\\ChartDirector\\lib"
End If
%>
<html>
<body topmargin="0" leftmargin="0" rightmargin="0" marginwidth="0" marginheight="0">
<div style="margin:5;">
<div style="font-family:verdana; font-weight:bold; font-size:18pt;">
ChartDirector DLL Diagnostic
</div>
<hr color="#000080">
<div style="font-family:verdana; font-size:10pt;">
Please enter the location of the ChartDirector DLLs<br>
<form action="<%=Request("SCRIPT_NAME")%>">
<input name="path" value="<%= displayPath %>" size="80"> <input type="submit" value="Check DLL">
<hr color="#000080">
<%
Function CheckFile(filename)
	On Error Resume Next
	Err.Clear
	Set f = fso.GetFile(filename)
	If Not Err Then
		CheckFile = f.size
		If Not Err Then
			Set dummy = f.openAsTextStream(1)
		End If
	End If
	If Err Then
		Response.Write "Error accessing " & filename & " (Err " & Hex(Err.Number) & " : " & Err.Description & ")"
		Response.Write "<br><br>Please check that the file exists and is readable and executable by the web server anonymous user.<br><br>"
	Else
		dummy.close
	End If
End Function

Function CheckRegistry(obj)
	On Error Resume Next
	Err.Clear
	Set WSHShell = CreateObject("WScript.Shell")
	If Err Then
		Response.Write "<br><br>Err " & Hex(Err.Number) & " : " & Err.Description
	Else
		progId = WshShell.RegRead("HKEY_CLASSES_ROOT\\" + obj + "\\CLSID\\")
		If Err Then
			Response.Write "<br><br>Err " & Hex(Err.Number) & " : " & Err.Description
		Else
			Response.Write "<br><br>Registry Prog ID for " & obj & " = " & progId
		End If
	End If
End Function

Function CheckObj(obj)
	On Error Resume Next
	Err.Clear
	Set dummy = CreateObject(obj)
	If Err Then
		Response.Write "Error creating object " & obj & " (Err " & Hex(Err.Number) & " : " & Err.Description & ")"
		CheckRegistry(obj)
		Response.Write "<br><br>Please check that the DLLs comchartdir.dll, aspapi.dll and msvbvm60.dll are registered correctly in your system (use regsvr32 to manually register if necessary).<br><br>"
	End If
End Function

If path <> "" Then
	
	On Error Resume Next
	Set fso = CreateObject("Scripting.FileSystemObject")
	If Err Then
		Response.Write "Error creating FileSystemObject (Err " & Hex(Err.Number) & " : " & Err.Description & ")"
		Response.Write "<br><br>Your web server appears to be corrupted or configured incorrectly. It does not even allow a standard Microsoft COM object to be created.<br><br>"
	Else
		sizeOfCom = CheckFile(path & "\\comchartdir.dll")
		sizeOfAsp = CheckFile(path & "\\aspapi.dll")
		If fso.FileExists(path & "\\chartdir50.dll") Then
			nameOfCD = "chartdir50.dll"
		ElseIf fso.FileExists(path & "\\chartdir41.dll") Then
			nameOfCD = "chartdir41.dll"
		ElseIf fso.FileExists(path & "\\chartdir31.dll") Then
			nameOfCD = "chartdir31.dll"
		ElseIf fso.FileExists(path & "\\chartdir30.dll") Then
			nameOfCD = "chartdir30.dll"
		ElseIf fso.FileExists(path & "\\chartdir25.dll") Then
			nameOfCD = "chartdir25.dll"
		ElseIf fso.FileExists(path & "\\chartdir20.dll") Then
			nameOfCD = "chartdir20.dll"
		Else
			nameOfCD = "chartdir40.dll"
		End If
		sizeOfCd = CheckFile(path & "\\" & nameOfCD)
		sizeOfVB = CheckFile(fso.GetSpecialFolder(1).Path & "\\msvbvm60.dll")
	
		Call checkObj("aspapi.ChartDirector")
		Call checkObj("ChartDirector.API")
	End If

%>
	<table border=1>
	<tr><th>DLL</th><th>Size</th></tr>
	<tr><td>comchartdir.dll</td><td><%=sizeOfCom %></td></tr>
	<tr><td>aspapi.dll</td><td><%=sizeOfAsp %></td></tr>
	<tr><td><%=nameOfCD%></td><td><%=sizeOfCd %></td></tr>
	<tr><td>msvbvm60.dll</td><td><%=sizeOfVB %></td></tr>
	</table>

<% End If %>
</div>
</body>
</html>

  Re: Object Not Initialize
Posted by David Azcu?naga on Jan-22-2010 16:56
I use the cdchk5.asp and this is the result I got:

Error creating object aspapi.ChartDirector (Err 1AD : El componente ActiveX no puede crear el objeto)

Registry Prog ID for aspapi.ChartDirector = {CE5ADB7B-A671-11D5-A23A-00000ED22400}

Please check that the DLLs comchartdir.dll, aspapi.dll and msvbvm60.dll are registered correctly in your system (use regsvr32 to manually register if necessary).

Error creating object ChartDirector.API (Err 46 : Permiso denegado)

Registry Prog ID for ChartDirector.API = {D5BD4E11-C316-4009-9E52-4EAC8F3A92F3}

Please check that the DLLs comchartdir.dll, aspapi.dll and msvbvm60.dll are registered correctly in your system (use regsvr32 to manually register if necessary).

DLL Size
comchartdir.dll 1687552
aspapi.dll 81920
chartdir50.dll 2310144
msvbvm60.dll 1386496

Still can`t get it to work.

  Re: Object Not Initialize
Posted by Peter Kwan on Jan-23-2010 00:42
Hi David,

Please try the followings:

(a) Ensure you are logging in your Windows using the "Administrator" account.

(b) Open a command shell. If you are using Windows Vista, please make sure you use "Run As Administrator" to open the command shell.

(c) Enter:

cd "c:\\Program Files\\ChartDirector\\lib"
regdll

Please let me know what is the result.

(d) If no error is encountered in step (c), please enter:

iisreset

Then try to use ChartDirector again through your IIS server to see if this solves the problem.

If the above still does not solve the problem, please let me know the result of (c), and also if you are using 32-bit Windows or 64-bit Windows.

Regards
Peter Kwan

  Re: Object Not Initialize
Posted by David Azcu?naga on Jan-23-2010 04:59
Hi Peter,

I tried what you said and this is the error message I get:

ERROR: Cannot set ChartDirector.API AppID security.
No se efectu? ninguna asignaci?n entre los nombres de cuenta y los identificador
es de seguridad.
(534)

The translation of the spanish part is (more or less): It wasn?t made any asignation between the account names and the security identifiers.

Thanks a lot for your help I hope I can solve this issue soon.

  Re: Object Not Initialize
Posted by Peter Kwan on Jan-25-2010 02:00
Attachments:
Hi David,

Thanks a lot for your very useful information.

Based on your error message, we are thinking, may be the error is related to the Spanish version of 64-bit Windows.

On 64-bit Windows, ChartDirector needs to register differently. Our current 64-bit registration code has been tested on English Chinese and Japanese Windows, but not Spanish Windows. After reading our registration code again, we suspect there may be an issue with the registration on Spanish Windows (but we do not have Spanish Windows for testing).

Anyway, we have modified our registration code as attached. Please kindly download the cdreg64p1.zip, and unzip it. It contains a file "cdreg64.exe". Please put it in "c:\\Program Files (x86)\\ChartDirector\\lib" to replace the existing "cdreg64.exe". Then run "regdll.bat" again.

Please kindly let me know if this can fix the problem.

Regards
Peter Kwan
cdreg64p1.zip
cdreg64p1.zip

18.19 Kb

  Re: Object Not Initialize
Posted by David Azcu?naga on Jan-25-2010 02:33
Thanks a lot Peter, it solved the problem!
Again thank you for your fast and helpfull response.

Best Regards,
David

  Re: Object Not Initialize
Posted by Peter Kwan on Jan-25-2010 03:21
Hi David,

Thanks a lot for informing us of the result. Now we are much more confident that we have found the cause of the issue. We will update the ChartDirector distribution with the new registration code.

Hope this can help.

Regards
Peter Kwan