This is an example program how to call the country related APIS More details about this example.
#include <windows.h>
#include <iostream>
#include <string>
#include "SFLOG.h"
#include "SFDBM.h"
bool dbm_example_init(void);
void dbm_example_shutdown(void);
int main(){
if(!dbm_example_init()){
std::wcout << L" ERROR - Failed to initialize the sdk. Exit!" << std::endl;
return -1;
}
std::wcout << L" SUCCESS - SFDB_ISVALIDCNTRYCODE for US is valid." << std::endl;
}
std::wcout << L" SUCCESS - SFDB_ISVALIDCNTRYCODE for GBR is valid." << std::endl;
}
std::wstring szCode(TEXT("GB"));
size_t nLen=28;
std::vector<TCHAR> szBuffer(nLen, 0x00);
std::wstring szWknCode = &szBuffer[0];
std::wcout << L" SUCCESS - SFDB_GETWKNDFROMCNTRY for GB is: " << szWknCode << std::endl;
}
nLen=szBuffer.size();
wmemset(&szBuffer[0], TCHAR(0), nLen);
std::wstring szCalCode = &szBuffer[0];
std::wcout << L" SUCCESS - SFDB_GETCALFROMCNTRY for GB is: " << szCalCode << std::endl;
}
dbm_example_shutdown();
return 0;
}
int __stdcall SFDB_GETCALFROMCNTRY(LPCTSTR argCode, LPTSTR retVal, size_t *nLen)
Return the calendar code associated with the given country.
Definition country.cpp:210
int __stdcall SFDB_ISVALIDCNTRYCODE(LPCTSTR argCode)
Return TRUE if the country code is a valid ISO country code (2 or 3 characters)
Definition country.cpp:47
int __stdcall SFDB_GETWKNDFROMCNTRY(LPCTSTR argCode, LPTSTR retVal, size_t *nLen)
Return the weekend convention of the government calendar of the given country.
Definition country.cpp:118