Title: | LinkWorks APO |
Moderator: | HLDE01::SYSTEM |
Created: | Tue Feb 22 1994 |
Last Modified: | Thu Jun 05 1997 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 476 |
Total number of notes: | 1817 |
I have some programing problems. 1. OLE problem (LNX 3.0.8) It is a sort program, that I have written in MS-Basic 3.0 and OLE. dim lnx as object dim root as object dim objref as string dim status as long set lnx = CreateObject("LNX.Application") set root = lnx.GetObject("Root") status = lnx.ImportNewObject(objref, "Text", "Textdoc", "AccRtPublic", "c:\tmp\xxx.doc") The import object will be create in LNX, but the return value "status" is 0 and the variable objref is empty. Why? A LNX tracing show no error, the method work correct without error. 2. DDE problem (LNX 3.0.8) At next I do the same function with DDE, in MS-Basic 3.0. This work's better, but the path parameter, it is "c:\tmp\xxx.doc", always cut at the dot (c:\tmp\xxx) and then LNX say file can't be found. Why? mfg Ing. Gerald Svobodnik Digital Equipment Austria
T.R | Title | User | Personal Name | Date | Lines |
---|---|---|---|---|---|
472.1 | elec5.uto.dec.com::maandag_j | Wed Mar 26 1997 17:18 | 20 | ||
Gerald, >The import object will be create in LNX, but the return value "status" is 0 and >objref is empty. Why? A LNX tracing show no error, the method work correct with This is a problem in Visual Basic 3.0. In VB 4.0 it works fine, you will get the object ref of the new created object back in the first parameter. >This work's better, but the path parameter, it is "c:\tmp\xxx.doc", always cut >(c:\tmp\xxx) and then LNX say file can't be found. Why? try "c:\\tmp\\xx.doc" Regards, Jos | |||||
472.2 | This is not the solution of DDE problem | ATZIS1::64312::Digital | Thu Mar 27 1997 17:51 | 14 | |
Hi The problem with the DDE function call is not the '\\' it is the '.' dot. In the next step I have change the name from "Textdoc" to "Textdoc.", after this LNX cancel the parameter transfer at the dot. So no accessright und no path is initalisation in the LNX method, but written in the Basic program. like this: LinkExecute root.Reference+".ImportNewObject( , Text, Textdec., AccRtPublic, C:\TMP\xxx.doc)" Gerald | |||||
472.3 | elec5.uto.dec.com::maandag_j | Tue Apr 01 1997 18:03 | 9 | ||
No it is not the "." You'll have to put the path between double quotes and escape the backslashes. The object name should also be string so either between quotes or a variable name. so you get somethinbg like this: cmd$ = objref + ".ImportNewObject(, Text, ""newname.ext"", AccRtPublic, ""c:\\dir\\file.ext"")" Success, Jos |