I am writing an application to change the...
Articles and Tips: qna
01 Oct 2000
Q.
I am writing an application to change the version stamp for a NAL object that updates virus pattern files. My idea is to use the NWDir control with the getfieldvalue or setfieldvalue method of a NWentry object. The Field APP:Version String is an octet string. I'm looking for an easy conversion routine for the octet string. I'm using the NWOctetString class. But the data is not a simple string. For example, the version string with NWAppAdm or NWAdmin is 20000808. With NWDir, I get the OctetString "3230303030383038". Where can I find a conversion table? Or do I have to build my own conversion routine?
A.
The octet string returns the hex values of the bytes ... 3230303030383038, which converts to "2" (hex 32), "0" (hex 30), and so on. You can use the VB Val() function--for example, Val("&H"&"32")--to convert to a byte value, or the Chr() function to convert it into characters. (Wolfgang Schreiber, Novell Worldwide Developer Support, EMEA)
* Originally published in Novell AppNotes
Disclaimer
The origin of this information may be internal or external to Novell. While Novell makes all reasonable efforts to verify this information, Novell does not make explicit or implied claims to its validity.