I'm attempting to use an active x dll which was written to take an rtf
file and convert it to html. The "readme" that came with the dll says
it needs to have the input and output file names passed to it as
"LPSTR strings." But no matter what I've tried, when I try to pass the
file names to the dll (as a foxpro object), I get "OLE Error Code
0x80020008. Bad variable type."

Help! I really can't figure this out. I can create the object,
(o=CREATEOBJECT("doxcom.doxlib") but no matter what I've tried, when I
try to pass the file names (o.SetInFileName("testthis.html")), I get
"OLE Error Code 0x80020008. Bad variable type." The functions I'm
trying to use are:

SetInFileName(LPSTR FileName)
SetOutFileName(LPSTR FileName)
Convert()

I've tried adding CHR$(0) to the strings, passing by reference and
value and even spent some time trying to figure out lstrcopy as an api
call from kernel32. Nothing has worked.

Ideas really appreciated

Re: How to Pass an LPSTR String from VFP 5.0 by Rick

Rick
Mon May 24 17:12:30 CDT 2004

Rick,
First, I believe it's a badly written COM DLL that specifies using LPSTR =
as a parameter. It should simply allow you to set a property to a string =
value. If the following code doesn't work, there is a routine (I believe =
on the Universal Thread) that allows you to create a memory space where =
you can set up these strings and then pass the pointer into the method:

o=3DCREATEOBJECT("doxcom.doxlib")
lcInFile =3D "testthis.html" && Do you need a fully qualified file name?
o.SetInFileName(lcInFile)

Rick

"Rick Peduzzi" <rick.peduzzi@ranknfile-ue.org> wrote in message =
news:9468cfa1.0405241347.a85938c@posting.google.com...
> I'm attempting to use an active x dll which was written to take an rtf
> file and convert it to html. The "readme" that came with the dll says
> it needs to have the input and output file names passed to it as
> "LPSTR strings." But no matter what I've tried, when I try to pass the
> file names to the dll (as a foxpro object), I get "OLE Error Code
> 0x80020008. Bad variable type."
>=20
> Help! I really can't figure this out. I can create the object,
> (o=3DCREATEOBJECT("doxcom.doxlib") but no matter what I've tried, when =
I
> try to pass the file names (o.SetInFileName("testthis.html")), I get
> "OLE Error Code 0x80020008. Bad variable type." The functions I'm
> trying to use are:
>=20
> SetInFileName(LPSTR FileName)
> SetOutFileName(LPSTR FileName)
> Convert()
>=20
> I've tried adding CHR$(0) to the strings, passing by reference and
> value and even spent some time trying to figure out lstrcopy as an api
> call from kernel32. Nothing has worked.
>=20
> Ideas really appreciated

Re: How to Pass an LPSTR String from VFP 5.0 by Rick

Rick
Mon May 24 17:16:13 CDT 2004

Rick,
As I sent my previous response, I also noticed the VFP 5.0 in the =
Subject (I tend to gloss over the Subjects), are you using SP3? VFP 5.0 =
was never really strong on COM work. If it's not a commercial product, =
and you want it checked under a later version of VFP (7.0+), send it to =
me or provide a link to a URL where I can get it.

Rick

"Rick Peduzzi" <rick.peduzzi@ranknfile-ue.org> wrote in message =
news:9468cfa1.0405241347.a85938c@posting.google.com...
> I'm attempting to use an active x dll which was written to take an rtf
> file and convert it to html. The "readme" that came with the dll says
> it needs to have the input and output file names passed to it as
> "LPSTR strings." But no matter what I've tried, when I try to pass the
> file names to the dll (as a foxpro object), I get "OLE Error Code
> 0x80020008. Bad variable type."
>=20
> Help! I really can't figure this out. I can create the object,
> (o=3DCREATEOBJECT("doxcom.doxlib") but no matter what I've tried, when =
I
> try to pass the file names (o.SetInFileName("testthis.html")), I get
> "OLE Error Code 0x80020008. Bad variable type." The functions I'm
> trying to use are:
>=20
> SetInFileName(LPSTR FileName)
> SetOutFileName(LPSTR FileName)
> Convert()
>=20
> I've tried adding CHR$(0) to the strings, passing by reference and
> value and even spent some time trying to figure out lstrcopy as an api
> call from kernel32. Nothing has worked.
>=20
> Ideas really appreciated

Re: How to Pass an LPSTR String from VFP 5.0 by rick

rick
Tue May 25 08:23:03 CDT 2004

Hi Rick,

Thank-you for responding ... I can use all the help I can get!

I tried your suggestion without any luck. If you'd like to try this
dll with VFP 7.0+, I'd appreciate it ... but the author of the dll is
very insistent that the only way to communicate with the dll is
through LPSTR strings. I'm assuming there is a way to do that through
a windows api call, but so far I've had no luck.

I've posted the activex DLL (which needs to be registered as an
activex server ... [regsvr ...]) along with the readme file that came
with it at ftp://www.*deleteme*ueunion.net/doxactivex.zip (sorry for
the disabled url). The complete package is at
http://docfrac.sourceforge.net/).

Again, thanks for your thoughts! If anyone has any code for converting
a foxpro string into an LPSTR string -- please let mne know.



"Rick Bean" <rgbean@unrealmelange-inc.com> wrote in message news:<#rtCn0dQEHA.644@tk2msftngp13.phx.gbl>...
> Rick,
> As I sent my previous response, I also noticed the VFP 5.0 in the
> Subject (I tend to gloss over the Subjects), are you using SP3? VFP 5.0
> was never really strong on COM work. If it's not a commercial product,
> and you want it checked under a later version of VFP (7.0+), send it to
> me or provide a link to a URL where I can get it.
>
> Rick
>
> "Rick Peduzzi" <rick.peduzzi@ranknfile-ue.org> wrote in message
> news:9468cfa1.0405241347.a85938c@posting.google.com...
> > I'm attempting to use an active x dll which was written to take an rtf
> > file and convert it to html. The "readme" that came with the dll says
> > it needs to have the input and output file names passed to it as
> > "LPSTR strings." But no matter what I've tried, when I try to pass the
> > file names to the dll (as a foxpro object), I get "OLE Error Code
> > 0x80020008. Bad variable type."
> >
> > Help! I really can't figure this out. I can create the object,
> > (o=CREATEOBJECT("doxcom.doxlib") but no matter what I've tried, when
> I
> > try to pass the file names (o.SetInFileName("testthis.html")), I get
> > "OLE Error Code 0x80020008. Bad variable type." The functions I'm
> > trying to use are:
> >
> > SetInFileName(LPSTR FileName)
> > SetOutFileName(LPSTR FileName)
> > Convert()
> >
> > I've tried adding CHR$(0) to the strings, passing by reference and
> > value and even spent some time trying to figure out lstrcopy as an api
> > call from kernel32. Nothing has worked.
> >
> > Ideas really appreciated

Re: How to Pass an LPSTR String from VFP 5.0 by Rick

Rick
Tue May 25 10:29:12 CDT 2004

Rick,
I tried it in VFP 8.0 SP1 (multiple variants) and I get exactly the same =
error, so at least it's not a VFP 5.0 only thing. <s>

I'll do some searching and see if I can locate that routine I mentioned =
and see if that helps.

In the mean time, I hope someone else has some ideas!

Rick

"Rick Peduzzi" <rick.peduzzi@ranknfile-ue.org> wrote in message =
news:9468cfa1.0405250523.39eee29d@posting.google.com...
> Hi Rick,
>=20
> Thank-you for responding ... I can use all the help I can get!
>=20
> I tried your suggestion without any luck. If you'd like to try this
> dll with VFP 7.0+, I'd appreciate it ... but the author of the dll is
> very insistent that the only way to communicate with the dll is
> through LPSTR strings. I'm assuming there is a way to do that through
> a windows api call, but so far I've had no luck.
>=20
> I've posted the activex DLL (which needs to be registered as an
> activex server ... [regsvr ...]) along with the readme file that came
> with it at ftp://www.*deleteme*ueunion.net/doxactivex.zip (sorry for
> the disabled url). The complete package is at
> http://docfrac.sourceforge.net/).
>=20
> Again, thanks for your thoughts! If anyone has any code for converting
> a foxpro string into an LPSTR string -- please let mne know.
>=20
>=20
>=20
> "Rick Bean" <rgbean@unrealmelange-inc.com> wrote in message =
news:<#rtCn0dQEHA.644@tk2msftngp13.phx.gbl>...
> > Rick,
> > As I sent my previous response, I also noticed the VFP 5.0 in the=20
> > Subject (I tend to gloss over the Subjects), are you using SP3? VFP =
5.0=20
> > was never really strong on COM work. If it's not a commercial =
product,=20
> > and you want it checked under a later version of VFP (7.0+), send it =
to=20
> > me or provide a link to a URL where I can get it.
> >=20
> > Rick
> >=20
> > "Rick Peduzzi" <rick.peduzzi@ranknfile-ue.org> wrote in message=20
> > news:9468cfa1.0405241347.a85938c@posting.google.com...
> > > I'm attempting to use an active x dll which was written to take an =
rtf
> > > file and convert it to html. The "readme" that came with the dll =
says
> > > it needs to have the input and output file names passed to it as
> > > "LPSTR strings." But no matter what I've tried, when I try to pass =
the
> > > file names to the dll (as a foxpro object), I get "OLE Error Code
> > > 0x80020008. Bad variable type."
> > >=20
> > > Help! I really can't figure this out. I can create the object,
> > > (o=3DCREATEOBJECT("doxcom.doxlib") but no matter what I've tried, =
when=20
> > I
> > > try to pass the file names (o.SetInFileName("testthis.html")), I =
get
> > > "OLE Error Code 0x80020008. Bad variable type." The functions I'm
> > > trying to use are:
> > >=20
> > > SetInFileName(LPSTR FileName)
> > > SetOutFileName(LPSTR FileName)
> > > Convert()
> > >=20
> > > I've tried adding CHR$(0) to the strings, passing by reference and
> > > value and even spent some time trying to figure out lstrcopy as an =
api
> > > call from kernel32. Nothing has worked.
> > >=20
> > > Ideas really appreciated

Re: How to Pass an LPSTR String from VFP 5.0 by Dan

Dan
Tue May 25 11:06:13 CDT 2004

I believe the utility you mentioned is the "Heap allocation class" File
#9482 located at Universal Thread.
This class was very helpful to me when accessing 3rd party API calls.
It allows to allocate memory and build structures to pass to Win API.

SergeyBer on this newsgroup informed me of this class, he may have had more
experience with this tool.

Good luck, HTH

Dan T
*---------------------------------------------------------------------------
-------------------------------------------------------


"Rick Bean" <rgbean@unrealmelange-inc.com> wrote in message
news:%238B7I0mQEHA.3532@TK2MSFTNGP12.phx.gbl...
Rick,
I tried it in VFP 8.0 SP1 (multiple variants) and I get exactly the same
error, so at least it's not a VFP 5.0 only thing. <s>

I'll do some searching and see if I can locate that routine I mentioned and
see if that helps.

In the mean time, I hope someone else has some ideas!

Rick

"Rick Peduzzi" <rick.peduzzi@ranknfile-ue.org> wrote in message
news:9468cfa1.0405250523.39eee29d@posting.google.com...
> Hi Rick,
>
> Thank-you for responding ... I can use all the help I can get!
>
> I tried your suggestion without any luck. If you'd like to try this
> dll with VFP 7.0+, I'd appreciate it ... but the author of the dll is
> very insistent that the only way to communicate with the dll is
> through LPSTR strings. I'm assuming there is a way to do that through
> a windows api call, but so far I've had no luck.
>
> I've posted the activex DLL (which needs to be registered as an
> activex server ... [regsvr ...]) along with the readme file that came
> with it at ftp://www.*deleteme*ueunion.net/doxactivex.zip (sorry for
> the disabled url). The complete package is at
> http://docfrac.sourceforge.net/).
>
> Again, thanks for your thoughts! If anyone has any code for converting
> a foxpro string into an LPSTR string -- please let mne know.
>
>
>
> "Rick Bean" <rgbean@unrealmelange-inc.com> wrote in message
news:<#rtCn0dQEHA.644@tk2msftngp13.phx.gbl>...
> > Rick,
> > As I sent my previous response, I also noticed the VFP 5.0 in the
> > Subject (I tend to gloss over the Subjects), are you using SP3? VFP 5.0
> > was never really strong on COM work. If it's not a commercial product,
> > and you want it checked under a later version of VFP (7.0+), send it to
> > me or provide a link to a URL where I can get it.
> >
> > Rick
> >
> > "Rick Peduzzi" <rick.peduzzi@ranknfile-ue.org> wrote in message
> > news:9468cfa1.0405241347.a85938c@posting.google.com...
> > > I'm attempting to use an active x dll which was written to take an rtf
> > > file and convert it to html. The "readme" that came with the dll says
> > > it needs to have the input and output file names passed to it as
> > > "LPSTR strings." But no matter what I've tried, when I try to pass the
> > > file names to the dll (as a foxpro object), I get "OLE Error Code
> > > 0x80020008. Bad variable type."
> > >
> > > Help! I really can't figure this out. I can create the object,
> > > (o=CREATEOBJECT("doxcom.doxlib") but no matter what I've tried, when
> > I
> > > try to pass the file names (o.SetInFileName("testthis.html")), I get
> > > "OLE Error Code 0x80020008. Bad variable type." The functions I'm
> > > trying to use are:
> > >
> > > SetInFileName(LPSTR FileName)
> > > SetOutFileName(LPSTR FileName)
> > > Convert()
> > >
> > > I've tried adding CHR$(0) to the strings, passing by reference and
> > > value and even spent some time trying to figure out lstrcopy as an api
> > > call from kernel32. Nothing has worked.
> > >
> > > Ideas really appreciated