CSummInfo::CSummInfo() { m_propSet.SetFormatVersion(0); DWORD dwOSVer; dwOSVer = (DWORD)MAKELONG(LOWORD(GetVersion()), 2); m_propSet.SetOSVersion(dwOSVer); m_propSet.SetClassID(FMTID_SummaryInformation); m_pSection = m_propSet.AddSection(FMTID_SummaryInformation); UINT cp = GetACP(); m_pSection->Set(PID_CODEPAGE, (void*)&cp, VT_I2); SetTitle(_T("")); SetSubject(_T("")); SetAuthor(_T("")); SetKeywords(_T("")); SetComments(_T("")); SetTemplate(_T("")); SetLastAuthor(_T("")); m_pSection->Set(PIDSI_REVNUMBER, (void*)_T("0"), VT_LPSTR); FILETIME zeroTime = {0L, 0L}; m_pSection->Set(PIDSI_EDITTIME, (void*)&zeroTime, VT_FILETIME); m_pSection->Set(PIDSI_LASTPRINTED, (void*)&zeroTime, VT_FILETIME); m_pSection->Set(PIDSI_LASTSAVE_DTM, (void*)&zeroTime, VT_FILETIME); m_pSection->Set(PIDSI_CREATE_DTM, (void*)&zeroTime, VT_FILETIME); SetNumPages(0); SetNumWords(0); SetNumChars(0); SetAppname(_T("")); SetSecurity(0); }
/* Function: void DRV_WIFI_SecurityWepSet(DRV_WIFI_WEP_CONTEXT* p_context); Summary: Sets WiFi security to use WEP. Description: This function sets the WiFi security to WEP. One can only connect to an AP that is running the same WEP mode. Precondition: WiFi initialization must be complete. Must be in an unconnected state. Parameters: p_context - desired WEP context. See DRV_WIFI_WEP_CONTEXT structure. Returns: None Example: <code> DRV_WIFI_WEP_CONTEXT context; context.wepSecurityType = DRV_WIFI_SECURITY_WEP_40; context.wepKey[] = {0x5a, 0xfb, 0x6c, 0x8e, 0x77, 0xc1, 0x04, 0x49, 0xfd, 0x4e, 0x43, 0x18, 0x2b, 0x33, 0x88, 0xb0, 0x73, 0x69, 0xf4, 0x78}; context.wepKeyLength = 20; context.wepKeyType = DRV_WIFI_SECURITY_WEP_OPENKEY; DRV_WIFI_SecurityOpenSet(&context); </code> Remarks: None */ void DRV_WIFI_SecurityWepSet(DRV_WIFI_WEP_CONTEXT* p_context) { SetSecurity(p_context->wepSecurityType, p_context->wepKey, p_context->wepKeyLength); SetWepKeyType(p_context->wepKeyType); }
/* Function: DRV_WIFI_SecurityWpaSet(DRV_WIFI_WPA_CONTEXT *p_context) Summary: Sets WiFi security to use WPA or WPA2. Description: This function sets the WiFi security to WPA or WPA2. One can only connect to an AP that is running the same WPA mode. Parameters: p_context - Desired WPA context. See DRV_WIFI_WPA_CONTEXT structure. Returns: None. */ void DRV_WIFI_SecurityWpaSet(DRV_WIFI_WPA_CONTEXT *p_context) { #if defined(WF_ERROR_CHECKING) uint32_t errorCode; errorCode = UdSetSecurityWpa(p_context); if (errorCode != UD_SUCCESS) { EventEnqueue(WF_EVENT_ERROR, errorCode); return; } #endif /* WF_ERROR_CHECKING */ SetSecurity(p_context->wpaSecurityType, p_context->keyInfo.key, p_context->keyInfo.keyLength); }
/* Function: void DRV_WIFI_SecurityWpsSet(DRV_WIFI_WPS_CONTEXT *p_context); Summary: Sets WiFi security to use WPS Description: This function sets the WiFi security to WPS. One can only connect to an AP that supports WPS. Parameters: p_context - desired WPA context. See DRV_WIFI_WPS_CONTEXT structure. Returns: None */ void DRV_WIFI_SecurityWpsSet(DRV_WIFI_WPS_CONTEXT *p_context) { SetSecurity(p_context->wpsSecurityType, p_context->wpsPin, p_context->wpsPinLength); #if defined(DRV_WIFI_USE_HOST_WPA_KEY_CALCULATION) // if host wants the host to calculate a binary key from a possible WPS-PSK passphrase if (p_context->getPassPhrase == true) { // tell MRF24WG to send wpa-psk passphrase back to host (if AP using WPA passphrase) YieldPassPhraseToHost(); // save pointer to passphrase info block g_p_wpaKeyInfo = p_context->p_keyInfo; } #endif /* DRV_WIFI_USE_HOST_WPA_KEY_CALCULATION */ }
/* Function: void DRV_WIFI_SecurityOpenSet(void); Summary: Sets WiFi security to open (no security) Description: This function sets the WiFi security to open. One can only connect to an AP that is running in open mode. Parameters: None Returns: None */ void DRV_WIFI_SecurityOpenSet() { SetSecurity(DRV_WIFI_SECURITY_OPEN, NULL, 0); }
/* Function: void DRV_WIFI_SecurityWpsSet(DRV_WIFI_WPS_CONTEXT *p_context) Summary: Sets WiFi security to use WPS. Description: This function sets the WiFi security to WPS. One can only connect to an AP that supports WPS. Parameters: p_context - Desired WPA context. See DRV_WIFI_WPS_CONTEXT structure. Returns: None. */ void DRV_WIFI_SecurityWpsSet(DRV_WIFI_WPS_CONTEXT *p_context) { SetSecurity(p_context->wpsSecurityType, p_context->wpsPin, p_context->wpsPinLength); }