Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #9214 > unrolled thread

Object creation failed

Started byJames Martin <james@northwoodlumber.com>
First post2016-03-31 11:16 -0400
Last post2016-04-09 16:38 -0400
Articles 6 — 3 participants

Back to article view | Back to comp.lang.clipper.visual-objects


Contents

  Object creation failed James Martin <james@northwoodlumber.com> - 2016-03-31 11:16 -0400
    Re: Object creation failed Mathias <mathias.hakansson@consultec.se> - 2016-03-31 23:54 -0700
      Re: Object creation failed James Martin <james@northwoodlumber.com> - 2016-04-01 11:00 -0400
      Re: Object creation failed James Martin <james@northwoodlumber.com> - 2016-04-08 16:52 -0400
        Re: Object creation failed "Glen Townsley" <glent@pronamics.com.au> - 2016-04-10 05:34 +1000
          Re: Object creation failed James Martin <james@northwoodlumber.com> - 2016-04-09 16:38 -0400

#9214 — Object creation failed

FromJames Martin <james@northwoodlumber.com>
Date2016-03-31 11:16 -0400
SubjectObject creation failed
Message-ID<ndjep1$8rk$1@dont-email.me>
I have a program that uses Microsoft's web browser as an OLE object. I 
needed to make a new program with variations, but keep the old, so I 
exported all the modules and created a new application and imported 
them. That all worked except that my web browser doesn't work. This is 
the error I get:

Error Code: Object creation failed
Subsystem: Visual Objects OLE Run Time
Function: OLEOBJECT: CREATEFROMAPPDOCSTORAGE
Description: Object creation failed
Callstack:
PRICETAB_FLOORONG:INIT (Line:9)
PRICEBOOK:INIT (Line:39)
APP:START (Line:61)
START (Line:6)

This error comes up when I try to run the program in inr IDE.

When I open the window for editing I get the error (but the window opens 
after I acknowledge the error):

Can't load OLE object from AppDoc file.

Here is the code in the Init() prg:
	oDCOCX_Shell1 := 		 
WebInsert{SELF,ResourceID{PRICETAB_FLOORONG_OCX_SHELL1,_GetInst()}}
	oDCOCX_Shell1:HyperLabel := 
HyperLabel{#OCX_Shell1,NULL_STRING,NULL_STRING,NULL_STRING}
oDCOCX_Shell1:CreateFromAppDocStorage(OleAppDocStorage{__MDFFILENAME__, 
"PriceTab_Floorong", "OCX_Shell1"})

Here is the code in the PostInit() prg:
	SELF:oDCOCX_Shell1:AddressBar	:= TRUE
	SELF:oDCOCX_Shell1:StatusBar	:= TRUE

	SELF:oDCOCX_Shell1:ShowBrowserBar()
	SELF:oDCOCX_Shell1:Refresh()
	SELF:oDCOCX_Shell1:Navigate("192.168.10.50")

If someone can help me with this AppDoc file it would be appreciated. 
Thanks.

James

[toc] | [next] | [standalone]


#9216

FromMathias <mathias.hakansson@consultec.se>
Date2016-03-31 23:54 -0700
Message-ID<3400189b-cbf5-4e0d-bd6c-78bd2ca4cbf4@googlegroups.com>
In reply to#9214
The best way is to get rid of the mdf file and create the Control in your PostInit method instead. 

First copy the code that initializes the Control from init to postinit and also copy the variable declaration in the class declaration. Then tell the window editor not to create code for the Control and save. Add the Control variable declaration to the class definition and adjust your code in postinit to something similar to my example below. You have find out the ocx Control name for this to work (VCF1.VCF1Ctrl.1 in my case). 

self:oDCF1 := VCIFormulaOneWorkbook{self,ResourceID{F1WINDOW_F1,_GetInst()}} 
self:oDCF1:HyperLabel := HyperLabel{#F1,NULL_STRING,NULL_STRING,NULL_STRING} 
self:oDCF1:OwnerAlignment := OA_FULL_SIZE 
if !self:oDCF1:CreateEmbedding("VCF1.VCF1Ctrl.1") 
        InfoBox{,"Failed to initialize F1"}:Show() 
endif 

/MathiasH 


Den torsdag 31 mars 2016 kl. 17:15:49 UTC+2 skrev James Martin:
> I have a program that uses Microsoft's web browser as an OLE object. I 
> needed to make a new program with variations, but keep the old, so I 
> exported all the modules and created a new application and imported 
> them. That all worked except that my web browser doesn't work. This is 
> the error I get:
> 
> Error Code: Object creation failed
> Subsystem: Visual Objects OLE Run Time
> Function: OLEOBJECT: CREATEFROMAPPDOCSTORAGE
> Description: Object creation failed
> Callstack:
> PRICETAB_FLOORONG:INIT (Line:9)
> PRICEBOOK:INIT (Line:39)
> APP:START (Line:61)
> START (Line:6)
> 
> This error comes up when I try to run the program in inr IDE.
> 
> When I open the window for editing I get the error (but the window opens 
> after I acknowledge the error):
> 
> Can't load OLE object from AppDoc file.
> 
> Here is the code in the Init() prg:
> 	oDCOCX_Shell1 := 		 
> WebInsert{SELF,ResourceID{PRICETAB_FLOORONG_OCX_SHELL1,_GetInst()}}
> 	oDCOCX_Shell1:HyperLabel := 
> HyperLabel{#OCX_Shell1,NULL_STRING,NULL_STRING,NULL_STRING}
> oDCOCX_Shell1:CreateFromAppDocStorage(OleAppDocStorage{__MDFFILENAME__, 
> "PriceTab_Floorong", "OCX_Shell1"})
> 
> Here is the code in the PostInit() prg:
> 	SELF:oDCOCX_Shell1:AddressBar	:= TRUE
> 	SELF:oDCOCX_Shell1:StatusBar	:= TRUE
> 
> 	SELF:oDCOCX_Shell1:ShowBrowserBar()
> 	SELF:oDCOCX_Shell1:Refresh()
> 	SELF:oDCOCX_Shell1:Navigate("192.168.10.50")
> 
> If someone can help me with this AppDoc file it would be appreciated. 
> Thanks.
> 
> James

[toc] | [prev] | [next] | [standalone]


#9225

FromJames Martin <james@northwoodlumber.com>
Date2016-04-01 11:00 -0400
Message-ID<ndm27l$n97$1@dont-email.me>
In reply to#9216
OK I'll try this. Thanks.

James

On 16-04-01 02:54 AM, Mathias wrote:
> The best way is to get rid of the mdf file and create the Control in your PostInit method instead.
>
> First copy the code that initializes the Control from init to postinit and also copy the variable declaration in the class declaration. Then tell the window editor not to create code for the Control and save. Add the Control variable declaration to the class definition and adjust your code in postinit to something similar to my example below. You have find out the ocx Control name for this to work (VCF1.VCF1Ctrl.1 in my case).
>
> self:oDCF1 := VCIFormulaOneWorkbook{self,ResourceID{F1WINDOW_F1,_GetInst()}}
> self:oDCF1:HyperLabel := HyperLabel{#F1,NULL_STRING,NULL_STRING,NULL_STRING}
> self:oDCF1:OwnerAlignment := OA_FULL_SIZE
> if !self:oDCF1:CreateEmbedding("VCF1.VCF1Ctrl.1")
>          InfoBox{,"Failed to initialize F1"}:Show()
> endif
>
> /MathiasH
>
>
> Den torsdag 31 mars 2016 kl. 17:15:49 UTC+2 skrev James Martin:
>> I have a program that uses Microsoft's web browser as an OLE object. I
>> needed to make a new program with variations, but keep the old, so I
>> exported all the modules and created a new application and imported
>> them. That all worked except that my web browser doesn't work. This is
>> the error I get:
>>
>> Error Code: Object creation failed
>> Subsystem: Visual Objects OLE Run Time
>> Function: OLEOBJECT: CREATEFROMAPPDOCSTORAGE
>> Description: Object creation failed
>> Callstack:
>> PRICETAB_FLOORONG:INIT (Line:9)
>> PRICEBOOK:INIT (Line:39)
>> APP:START (Line:61)
>> START (Line:6)
>>
>> This error comes up when I try to run the program in inr IDE.
>>
>> When I open the window for editing I get the error (but the window opens
>> after I acknowledge the error):
>>
>> Can't load OLE object from AppDoc file.
>>
>> Here is the code in the Init() prg:
>> 	oDCOCX_Shell1 := 		
>> WebInsert{SELF,ResourceID{PRICETAB_FLOORONG_OCX_SHELL1,_GetInst()}}
>> 	oDCOCX_Shell1:HyperLabel :=
>> HyperLabel{#OCX_Shell1,NULL_STRING,NULL_STRING,NULL_STRING}
>> oDCOCX_Shell1:CreateFromAppDocStorage(OleAppDocStorage{__MDFFILENAME__,
>> "PriceTab_Floorong", "OCX_Shell1"})
>>
>> Here is the code in the PostInit() prg:
>> 	SELF:oDCOCX_Shell1:AddressBar	:= TRUE
>> 	SELF:oDCOCX_Shell1:StatusBar	:= TRUE
>>
>> 	SELF:oDCOCX_Shell1:ShowBrowserBar()
>> 	SELF:oDCOCX_Shell1:Refresh()
>> 	SELF:oDCOCX_Shell1:Navigate("192.168.10.50")
>>
>> If someone can help me with this AppDoc file it would be appreciated.
>> Thanks.
>>
>> James
>

[toc] | [prev] | [next] | [standalone]


#9233

FromJames Martin <james@northwoodlumber.com>
Date2016-04-08 16:52 -0400
Message-ID<ne95ed$jlr$1@dont-email.me>
In reply to#9216
This is not working, possibly because I don't have the right name for 
the OCX control. Here is the code I am trying with:

	SELF:oDCOCX_Shell1 := 
WebInsert{SELF,ResourceID{PRICETAB_FLOORONG_OCX_SHELL1,_GetInst()}}
	SELF:oDCOCX_Shell1:HyperLabel := 
HyperLabel{#OCX_Shell1,NULL_STRING,NULL_STRING,NULL_STRING}
	IF !SELF:oDCOCX_Shell1:CreateEmbedding("WEBINSERT")
		ErrorBox{SELF,"Failed to initialize the web server"}:Show()
	ENDIF

Here is the offending code:
* 
oDCOCX_Shell1:CreateFromAppDocStorage(OleAppDocStorage{__MDFFILENAME__, 
"PriceTab_Floorong", "OCX_Shell1"})

What is the AppDoc?
Where can I find MDFFILENAME ?
Where can I find the name of the OCX?

Thanks for your help

James


On 16-04-01 02:54 AM, Mathias wrote:
> The best way is to get rid of the mdf file and create the Control in your PostInit method instead.
>
> First copy the code that initializes the Control from init to postinit and also copy the variable declaration in the class declaration. Then tell the window editor not to create code for the Control and save. Add the Control variable declaration to the class definition and adjust your code in postinit to something similar to my example below. You have find out the ocx Control name for this to work (VCF1.VCF1Ctrl.1 in my case).
>
> self:oDCF1 := VCIFormulaOneWorkbook{self,ResourceID{F1WINDOW_F1,_GetInst()}}
> self:oDCF1:HyperLabel := HyperLabel{#F1,NULL_STRING,NULL_STRING,NULL_STRING}
> self:oDCF1:OwnerAlignment := OA_FULL_SIZE
> if !self:oDCF1:CreateEmbedding("VCF1.VCF1Ctrl.1")
>          InfoBox{,"Failed to initialize F1"}:Show()
> endif
>
> /MathiasH
>
>
> Den torsdag 31 mars 2016 kl. 17:15:49 UTC+2 skrev James Martin:
>> I have a program that uses Microsoft's web browser as an OLE object. I
>> needed to make a new program with variations, but keep the old, so I
>> exported all the modules and created a new application and imported
>> them. That all worked except that my web browser doesn't work. This is
>> the error I get:
>>
>> Error Code: Object creation failed
>> Subsystem: Visual Objects OLE Run Time
>> Function: OLEOBJECT: CREATEFROMAPPDOCSTORAGE
>> Description: Object creation failed
>> Callstack:
>> PRICETAB_FLOORONG:INIT (Line:9)
>> PRICEBOOK:INIT (Line:39)
>> APP:START (Line:61)
>> START (Line:6)
>>
>> This error comes up when I try to run the program in inr IDE.
>>
>> When I open the window for editing I get the error (but the window opens
>> after I acknowledge the error):
>>
>> Can't load OLE object from AppDoc file.
>>
>> Here is the code in the Init() prg:
>> 	oDCOCX_Shell1 := 		
>> WebInsert{SELF,ResourceID{PRICETAB_FLOORONG_OCX_SHELL1,_GetInst()}}
>> 	oDCOCX_Shell1:HyperLabel :=
>> HyperLabel{#OCX_Shell1,NULL_STRING,NULL_STRING,NULL_STRING}
>> oDCOCX_Shell1:CreateFromAppDocStorage(OleAppDocStorage{__MDFFILENAME__,
>> "PriceTab_Floorong", "OCX_Shell1"})
>>
>> Here is the code in the PostInit() prg:
>> 	SELF:oDCOCX_Shell1:AddressBar	:= TRUE
>> 	SELF:oDCOCX_Shell1:StatusBar	:= TRUE
>>
>> 	SELF:oDCOCX_Shell1:ShowBrowserBar()
>> 	SELF:oDCOCX_Shell1:Refresh()
>> 	SELF:oDCOCX_Shell1:Navigate("192.168.10.50")
>>
>> If someone can help me with this AppDoc file it would be appreciated.
>> Thanks.
>>
>> James
>

[toc] | [prev] | [next] | [standalone]


#9236

From"Glen Townsley" <glent@pronamics.com.au>
Date2016-04-10 05:34 +1000
Message-ID<neblgl$1ifd$1@gioia.aioe.org>
In reply to#9233
James,

I have this line in my PostInit to create a web browser:

SELF:lValidWeb := SELF:oDColeWebBrowser:CreateEmbedding( "Shell.Explorer" )

HTH

Cheers

Glen Townsley

"James Martin"  wrote in message news:ne95ed$jlr$1@dont-email.me...

This is not working, possibly because I don't have the right name for
the OCX control. Here is the code I am trying with:

SELF:oDCOCX_Shell1 :=
WebInsert{SELF,ResourceID{PRICETAB_FLOORONG_OCX_SHELL1,_GetInst()}}
SELF:oDCOCX_Shell1:HyperLabel :=
HyperLabel{#OCX_Shell1,NULL_STRING,NULL_STRING,NULL_STRING}
IF !SELF:oDCOCX_Shell1:CreateEmbedding("WEBINSERT")
ErrorBox{SELF,"Failed to initialize the web server"}:Show()
ENDIF

Here is the offending code:
*
oDCOCX_Shell1:CreateFromAppDocStorage(OleAppDocStorage{__MDFFILENAME__,
"PriceTab_Floorong", "OCX_Shell1"})

What is the AppDoc?
Where can I find MDFFILENAME ?
Where can I find the name of the OCX?

Thanks for your help

James


On 16-04-01 02:54 AM, Mathias wrote:
> The best way is to get rid of the mdf file and create the Control in your 
> PostInit method instead.
>
> First copy the code that initializes the Control from init to postinit and 
> also copy the variable declaration in the class declaration. Then tell the 
> window editor not to create code for the Control and save. Add the Control 
> variable declaration to the class definition and adjust your code in 
> postinit to something similar to my example below. You have find out the 
> ocx Control name for this to work (VCF1.VCF1Ctrl.1 in my case).
>
> self:oDCF1 := 
> VCIFormulaOneWorkbook{self,ResourceID{F1WINDOW_F1,_GetInst()}}
> self:oDCF1:HyperLabel := 
> HyperLabel{#F1,NULL_STRING,NULL_STRING,NULL_STRING}
> self:oDCF1:OwnerAlignment := OA_FULL_SIZE
> if !self:oDCF1:CreateEmbedding("VCF1.VCF1Ctrl.1")
>          InfoBox{,"Failed to initialize F1"}:Show()
> endif
>
> /MathiasH
>
>
> Den torsdag 31 mars 2016 kl. 17:15:49 UTC+2 skrev James Martin:
>> I have a program that uses Microsoft's web browser as an OLE object. I
>> needed to make a new program with variations, but keep the old, so I
>> exported all the modules and created a new application and imported
>> them. That all worked except that my web browser doesn't work. This is
>> the error I get:
>>
>> Error Code: Object creation failed
>> Subsystem: Visual Objects OLE Run Time
>> Function: OLEOBJECT: CREATEFROMAPPDOCSTORAGE
>> Description: Object creation failed
>> Callstack:
>> PRICETAB_FLOORONG:INIT (Line:9)
>> PRICEBOOK:INIT (Line:39)
>> APP:START (Line:61)
>> START (Line:6)
>>
>> This error comes up when I try to run the program in inr IDE.
>>
>> When I open the window for editing I get the error (but the window opens
>> after I acknowledge the error):
>>
>> Can't load OLE object from AppDoc file.
>>
>> Here is the code in the Init() prg:
>> oDCOCX_Shell1 := 
>> WebInsert{SELF,ResourceID{PRICETAB_FLOORONG_OCX_SHELL1,_GetInst()}}
>> oDCOCX_Shell1:HyperLabel :=
>> HyperLabel{#OCX_Shell1,NULL_STRING,NULL_STRING,NULL_STRING}
>> oDCOCX_Shell1:CreateFromAppDocStorage(OleAppDocStorage{__MDFFILENAME__,
>> "PriceTab_Floorong", "OCX_Shell1"})
>>
>> Here is the code in the PostInit() prg:
>> SELF:oDCOCX_Shell1:AddressBar := TRUE
>> SELF:oDCOCX_Shell1:StatusBar := TRUE
>>
>> SELF:oDCOCX_Shell1:ShowBrowserBar()
>> SELF:oDCOCX_Shell1:Refresh()
>> SELF:oDCOCX_Shell1:Navigate("192.168.10.50")
>>
>> If someone can help me with this AppDoc file it would be appreciated.
>> Thanks.
>>
>> James
> 

[toc] | [prev] | [next] | [standalone]


#9237

FromJames Martin <james@northwoodlumber.com>
Date2016-04-09 16:38 -0400
Message-ID<nebp1a$1j5$1@dont-email.me>
In reply to#9236
Yes, I think that would work too!

James

On 16-04-09 03:34 PM, Glen Townsley wrote:
> James,
>
> I have this line in my PostInit to create a web browser:
>
> SELF:lValidWeb := SELF:oDColeWebBrowser:CreateEmbedding( "Shell.Explorer" )
>
> HTH
>
> Cheers
>
> Glen Townsley
>
> "James Martin"  wrote in message news:ne95ed$jlr$1@dont-email.me...
>
> This is not working, possibly because I don't have the right name for
> the OCX control. Here is the code I am trying with:
>
> SELF:oDCOCX_Shell1 :=
> WebInsert{SELF,ResourceID{PRICETAB_FLOORONG_OCX_SHELL1,_GetInst()}}
> SELF:oDCOCX_Shell1:HyperLabel :=
> HyperLabel{#OCX_Shell1,NULL_STRING,NULL_STRING,NULL_STRING}
> IF !SELF:oDCOCX_Shell1:CreateEmbedding("WEBINSERT")
> ErrorBox{SELF,"Failed to initialize the web server"}:Show()
> ENDIF
>
> Here is the offending code:
> *
> oDCOCX_Shell1:CreateFromAppDocStorage(OleAppDocStorage{__MDFFILENAME__,
> "PriceTab_Floorong", "OCX_Shell1"})
>
> What is the AppDoc?
> Where can I find MDFFILENAME ?
> Where can I find the name of the OCX?
>
> Thanks for your help
>
> James
>
>
> On 16-04-01 02:54 AM, Mathias wrote:
>> The best way is to get rid of the mdf file and create the Control in
>> your PostInit method instead.
>>
>> First copy the code that initializes the Control from init to postinit
>> and also copy the variable declaration in the class declaration. Then
>> tell the window editor not to create code for the Control and save.
>> Add the Control variable declaration to the class definition and
>> adjust your code in postinit to something similar to my example below.
>> You have find out the ocx Control name for this to work
>> (VCF1.VCF1Ctrl.1 in my case).
>>
>> self:oDCF1 :=
>> VCIFormulaOneWorkbook{self,ResourceID{F1WINDOW_F1,_GetInst()}}
>> self:oDCF1:HyperLabel :=
>> HyperLabel{#F1,NULL_STRING,NULL_STRING,NULL_STRING}
>> self:oDCF1:OwnerAlignment := OA_FULL_SIZE
>> if !self:oDCF1:CreateEmbedding("VCF1.VCF1Ctrl.1")
>>          InfoBox{,"Failed to initialize F1"}:Show()
>> endif
>>
>> /MathiasH
>>
>>
>> Den torsdag 31 mars 2016 kl. 17:15:49 UTC+2 skrev James Martin:
>>> I have a program that uses Microsoft's web browser as an OLE object. I
>>> needed to make a new program with variations, but keep the old, so I
>>> exported all the modules and created a new application and imported
>>> them. That all worked except that my web browser doesn't work. This is
>>> the error I get:
>>>
>>> Error Code: Object creation failed
>>> Subsystem: Visual Objects OLE Run Time
>>> Function: OLEOBJECT: CREATEFROMAPPDOCSTORAGE
>>> Description: Object creation failed
>>> Callstack:
>>> PRICETAB_FLOORONG:INIT (Line:9)
>>> PRICEBOOK:INIT (Line:39)
>>> APP:START (Line:61)
>>> START (Line:6)
>>>
>>> This error comes up when I try to run the program in inr IDE.
>>>
>>> When I open the window for editing I get the error (but the window opens
>>> after I acknowledge the error):
>>>
>>> Can't load OLE object from AppDoc file.
>>>
>>> Here is the code in the Init() prg:
>>> oDCOCX_Shell1 :=
>>> WebInsert{SELF,ResourceID{PRICETAB_FLOORONG_OCX_SHELL1,_GetInst()}}
>>> oDCOCX_Shell1:HyperLabel :=
>>> HyperLabel{#OCX_Shell1,NULL_STRING,NULL_STRING,NULL_STRING}
>>> oDCOCX_Shell1:CreateFromAppDocStorage(OleAppDocStorage{__MDFFILENAME__,
>>> "PriceTab_Floorong", "OCX_Shell1"})
>>>
>>> Here is the code in the PostInit() prg:
>>> SELF:oDCOCX_Shell1:AddressBar := TRUE
>>> SELF:oDCOCX_Shell1:StatusBar := TRUE
>>>
>>> SELF:oDCOCX_Shell1:ShowBrowserBar()
>>> SELF:oDCOCX_Shell1:Refresh()
>>> SELF:oDCOCX_Shell1:Navigate("192.168.10.50")
>>>
>>> If someone can help me with this AppDoc file it would be appreciated.
>>> Thanks.
>>>
>>> James
>>
>

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.clipper.visual-objects


csiph-web