Share via


Discovery Data Record Functions

To create discovery data records (DDR), you must use the functions from the following table. These functions create a single DDR that is sent to the Discovery Data Manager (DDM). The order in which you call the functions is important; you must call DDRNew before calling any of the functions that add properties. The last function you call must be either DDRSendToSMS or DDRWrite. However, the order in which you add properties to your class is arbitrary.

DDRs that fail to load are moved to the SMS\Inboxes\Ddm.box\Bad_ddrs directory. If you have logging turned on, you can view the DDM.log file for an explanation of the error. After you fix the errors, you can then rerun your program to load the DDR.

The SMSRsGen.dll file contains the DDR functions for C programmers. Visual Basic and scripting programmers use the SMSResGen class methods found in SMSResGenCtl.dll to create DDRs. These methods have the same name and parameters as the C library functions. For more information, see Setting Up Your Development Environment.

Note that the SMSResGen control is not thread safe — do not try to create more than one instance of this class.

For more information about DDRs and resource discovery, see Using DDRs in Resource Discovery . For an implementation of these functions, see the Make DDR (MakeDDR) sample.

The following table lists the functions used to create a DDR file.

Function Description
DDRNew Creates a new DDR.
DDRAddInteger Adds an integer property to the DDR.
DDRAddString Adds a string property to the DDR.
DDRAddIntegerArray Adds an integer array property to the DDR.
DDRAddStringArray Adds a string array property to the DDR.
DDRWrite Writes the DDR to a file.
DDRSendToSMS Writes the DDR file and sends it to the client access point (CAP) or site server.