|
-
May 11th, 2003, 11:09 AM
#1
Thread Starter
Member
if i "early-bind" an object, does it need to be prsent in the deployment m/c?
hi,
i have a fundamental/basic qs. related to early-binding/late binding concept. i need to use the MS internet transfer control(ocx) in a dll. but its not present in the final deployment m/c at the client site, though its present in the development environmet. my qs. is - if i early-bind it (using the New operator of VB) as opposed to late-binding (createobject), will the dll run ???
yes, i can test it in the deployment m/c & find it out by myself (!) , but the client is miles away, & there is a time-lag before the test can be done & the result knoen to me. so meanwhile i am posting this qs!
thanks a lot in advance.
-
May 11th, 2003, 11:19 AM
#2
If you have early binding to an object, then the component won't even start. I'm not sure if it will prevent the entire app to run, or if it will crash at the first reference of your DLL.
If it is late bound, then the app will crash when you try to reference it with CreateObject. At that point you can use error handling.
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
May 11th, 2003, 01:02 PM
#3
Thread Starter
Member
some more facts
well, we first tried to use the intet control in the ASP page (using Server.CreateObject) in the deployment m/c. the error message told us that the PROGId cannot be found for the object. then we registered the Inet control there (using regsvr32). when we re-ran the ASP page, the error msg told us that the class is not licensed. then we left the ASP page at that. then a VB dll was created which called the Inet control (early-binding). the ASP page called our custom dll. when this dll was registered in the deployment m/c, then the ASP page ran successfully. i dont yet know what will happen if the inet ocx control is unregistered from there.
do u think while creating the dll, the license information was included, so that license error didnot throw up???
thanks a lot.
-
May 11th, 2003, 03:52 PM
#4
Member
Based on Mastering VisualBasic Enterprise document Early Binding or Late binding is not about using CreateObject or New operator when instancing object. An late binding occurs when we declare variable as object type ( Dim objvar as Object), so visual basic dont know yet what exactly objvar is.
Early Binding occurs when we declare a variable as a specific type (dim objvar as adodb.connection).
CreateObject or New operator can be use to create an instance of a class. New operator is recommended because its the fastest way to create an object.
If you make an activeX dll componet for your application, you have to properly register that component when deploying your application to the client or just Use Package and Deployment Wizard of VB. If you are creating componet that must reside on Server and your client have to access this component remotely try using COM+.
[vbcode]
if (myEnglish is Poor And BotheringYou) then
' Try to Concentrate on My Question or Statement
MsgBox "Thanks"
end if
[/vbcode]
-
May 11th, 2003, 04:11 PM
#5
Member
You have to registered the component in server machine that host your asp page (IIS server?). Use server.creteObject() to instance an object.
[vbcode]
if (myEnglish is Poor And BotheringYou) then
' Try to Concentrate on My Question or Statement
MsgBox "Thanks"
end if
[/vbcode]
-
May 12th, 2003, 12:08 AM
#6
Thread Starter
Member
hi xor,
may be my qs. wasnt clear enuf... i am definitely registering my own dll (the one that i wrote) but my dll calls an VB ocx control ( it is Microsoft Internet Transfer Control) thru' early binding. my qs. is does Microsoft Internet Transfer Control ocx needs to be present in the m/c ?
thanks
-
May 13th, 2003, 03:36 AM
#7
Member
[vbcode]
if (myEnglish is Poor And BotheringYou) then
' Try to Concentrate on My Question or Statement
MsgBox "Thanks"
end if
[/vbcode]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|