lgo_SetDefaultConfiguration()
Set the default configuration for a protocol.
#include "laygo.h" LResult lgo_SetDefaultConfiguration ( LProtocol protocol, LCtlBuffer buffer, LBufferSize count );
protocol | protocol of the configuration |
buffer | buffer containing the configuration |
count | size of buffer in bytes |
lgo_SetDefaultConfiguration() sets the deafult configuration of a protocol prior to stack initialization. The effect is the same as if the configuration was written to a separate file by calling lgo_SaveConfiguration() and then loaded by calling lgo_ConfigureStack().
If successful, lgo_SetDefaultConfiguration() returns a non-negative value. Otherwise, it returns a negative value indicating the reason it failed. Possible unsuccessful return values are:
#include "stackapi.h" StackCfgStruct config; LResult result; result = lgo_LoadConfiguration(file, lgo_PROTOCOL_SYSTEM_STACK, (LCtlBuffer) &config, (LBufferSize) sizeof(config)); if (result > 0) { config.driverCount = 1; config.driver[0] = driverId; result = lgo_SetDefaultConfiguration( lgo_PROTOCOL_SYSTEM_STACK, (LCtlBuffer) &config, (LBufferSize) sizeof(config)); } return (result);