[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference utrop1::lnx_apo

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

472.0. "OLE & DDE problems" by ATZIS1::64312::Digital () Wed Mar 26 1997 16:22

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.RTitleUserPersonal
Name
DateLines
472.1elec5.uto.dec.com::maandag_jWed Mar 26 1997 17:1820
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.2This is not the solution of DDE problemATZIS1::64312::DigitalThu Mar 27 1997 17:5114
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.3elec5.uto.dec.com::maandag_jTue Apr 01 1997 18:039
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