Novell Home

TID101234 (INLSR6) - NLSAddProductInformation() returning LS BAD ARG in ADDPINFO Example

From Developer Community

ABSTRACT:

Using the NLS example ADDPINFO.C on the SDK results in NLSAddProductInformation() returning 0xC000100E, LS_BAD_ARG.

DETAILED DESCRIPTION

Recently, engineering put a check in many of the NLS APIs to return an LS_BAD_ARG when a NULL was passed in as a parameter. However, for this API, a NULL makes sense when the attributesLength is 0 and no licenseAttributes will be used. This problem has been reported to engineering.

A work-around to the problem is to pass into NLSAddProductInformation() a buffer to licenseAttributes and an attributesLength of 0.

Partial Example:

char atrBuff[255];

result = NLSAddProductInformation(LS_ANY, LS_ANY, publisher, product, version, numUnits, 0, (LS_VOID *)atrBuff);

inlsr6.exe

inlsr6.exe20.2 K2005-04-06

--Benjamin Fjeldsted

Novell® Making IT Work As One

© 2009 Novell, Inc. All Rights Reserved.