LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I get an unsigned char string with nulls from a dll into LabVIEW 6i?

Well, I zipped it and send it. It doesn't show up (for me)...

If it is visible for you, enjoy it. If it didn't, too bad. I'm off for two
weeks.

If you're *very* fast, I still can send it straight to you.

Regards,

Wiebe.

"jcoppock" wrote in message
news:5065000000050000003F960000-1027480788000@exchange.ni.com...
> Zipping up attachments seems to be working if you could just do that.
> I'm interested in seeing your solution, but I don't know that I really
> want to replace nulls with another value because I don't know what
> value I would choose that would be reliably consistant.
0 Kudos
Message 21 of 28
(1,374 Views)
Btw.

When LV sees a \00 from a dll it ends the string. But if you have a LV
string, you can attach \00 after it!

This works because LV keeps track of the length of the string, in stead of
ending it after \00 (correct me if I'm wrong, Greg). Anyway, NULL is valid
in LV, but not in a C string, because it ends the string.

Here it is (let's see if it works)...

Regards,

Wiebe.

"jcoppock" wrote in message
news:5065000000050000003F960000-1027480788000@exchange.ni.com...
> Zipping up attachments seems to be working if you could just do that.
> I'm interested in seeing your solution, but I don't know that I really
> want to replace nulls with another value because I don't know what
> value I would choose that
would be reliably consistant.
0 Kudos
Message 22 of 28
(1,374 Views)
I'm back from holiday. Do you still want it?


"Wiebe@AIR" wrote in message
news:3d5cfda2$0$1666$e4fe514c@dreader4.news.xs4all.nl...
> Well, I zipped it and send it. It doesn't show up (for me)...
>
> If it is visible for you, enjoy it. If it didn't, too bad. I'm off for two
> weeks.
>
> If you're *very* fast, I still can send it straight to you.
>
> Regards,
>
> Wiebe.
>
> "jcoppock" wrote in message
> news:5065000000050000003F960000-1027480788000@exchange.ni.com...
> > Zipping up attachments seems to be working if you could just do that.
> > I'm interested in seeing your solution, but I don't know that I really
> > want to replace nulls with another value because I don't know what
>
> value I would choose that would be reliably consistant.
>
>
0 Kudos
Message 23 of 28
(1,374 Views)
I got it working, thanks.
0 Kudos
Message 24 of 28
(1,374 Views)
Ok, about 20% of the messages in this newsgroup don't reach my computer. I
cannot see my own message because it has an attachment...

Regards,

Wiebe.


"jcoppock" wrote in message
news:506500000005000000979C0000-1027480788000@exchange.ni.com...
> I got it working, thanks.
0 Kudos
Message 25 of 28
(1,374 Views)
I am having difficulties using a DLL with is returning a string will nulls in the middle of it. I would be interested in seeing your example of using lstrcpyn from kernel32.dll or any other examples that you may have?

Regards

Jimbo
0 Kudos
Message 26 of 28
(1,238 Views)
Well I would certainly go for the unsigned 8 bit array parameter method. That is the best one and contrary to your claim does not require any changes to the DLL. For the rest it is a good recommendation and the most direct approach to do, what the OP has to do.

Rolf Kalbermatter
Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 27 of 28
(1,238 Views)
Jimbo,

I'm not sure if it helps, but it is an example of using lstrcpyn...

Regards,

Wiebe.

"lvjimbo" wrote in message
news:506500000005000000B2800100-1079395200000@exchange.ni.com...
> I am having difficulties using a DLL with is returning a string will
> nulls in the middle of it. I would be interested in seeing your
> example of using lstrcpyn from kernel32.dll or any other examples that
> you may have?
>
> Regards
>
> Jimbo



[Attachment Multi File Dialog.llb, see below]
0 Kudos
Message 28 of 28
(1,240 Views)