#include <dwc.h>
BOOL DWC_NdInitAsync(DWCNdCallback callback,
const char *gamecd,
const char *passwd);callback |
Pointer to the callback function called in response to various types of notifications from the Download library. Always specify this argument. |
gamecd |
Pointer to the connection-use game code (string) required when accessing the download server. |
passwd |
Pointer to the game-use password (string) required when accessing the download server. |
TRUE |
Success. When initialization is complete, a callback function is called. |
FALSE |
Failure. Use the DWC_GetLastErrorEx function to get error information. |
Starts initialization of the Download library.
HTTP communications are conducted in the background during initialization. Give plenty of processing time for the threads whose priority is lower than that of the main thread. Two types of download servers are available: one for development and one for production. You can switch between these servers by switching authentication servers with the DWC_InitForDevelopment and DWC_InitForProduction functions.
The values specified for the gamecd and passwd arguments are issued after you have applied to Nintendo to use the Download server.
Once this function is called and TRUE is returned, be sure to call the DWC_NdProcess function about once per game frame to advance processing.
Use the DWCNdCallback type callback function specified using this function to notify that initialization is complete.
Because the download library starts up when TRUE is returned, the DWC_NdCleanupAsync function must be called even if an error occurred during the asynchronous initialization processing.
This function internally calls the NHTTPStartup function of the TWL-SDK Wi-Fi library. Avoid the overlapping use of NHTTP before and after the time interval between the call to this function and the time that the processes performed by DWC_NdCleanupAsync are completed.
As for download speed, performance falls off dramatically when downloading large files using the default receiving window size.
Use the DWC_SetRwinSize function to set the appropriate receiving window size for each application in advance.
DWCNdCallback
DWC_GetLastErrorEx
DWC_NdProcess
DWC_SetRwinSize
DWC_InitForDevelopment or the DWC_InitForProduction functions, and not with the DWC_SetAuthServer function. For the change log prior to 5.1 PR2, click here.
CONFIDENTIAL