int CClosableTabCtrl::OnCreate(LPCREATESTRUCT lpCreateStruct) { if (CTabCtrl::OnCreate(lpCreateStruct) == -1) return -1; InternalInit(); return 0; }
/***************************************************************************** * CKsFilter::CKsFilter() ***************************************************************************** *//*! * @brief * Constructor. */ CKsFilter:: CKsFilter ( IN LPCTSTR SymbolicLink, IN LPCTSTR FriendlyName, OUT HRESULT * OutHResult ) : CKsIrpTarget(INVALID_HANDLE_VALUE) { HRESULT hr = InternalInit(); if (NULL == SymbolicLink) { hr = E_INVALIDARG; _DbgPrintF(DEBUGLVL_ERROR,("SymbolicLink cannot be NULL")); } if (SUCCEEDED(hr)) { _tcsncpy(m_SymbolicLink, SymbolicLink, MAX_PATH); _tcsncpy(m_FriendlyName, FriendlyName, MAX_PATH); } *OutHResult = hr; }
void ProgramClick::Init(const Vec2i &_ScreenCoord) { InternalInit(); ScreenCoord = _ScreenCoord; RightClick = false; Name = String("Click <") + ScreenCoord.CommaSeparatedString() + String(">"); }
void StackFrameIterator::InternalInitForStackTrace() { STRESS_LOG0(LF_STACKWALK, LL_INFO10000, "----Init---- [ StackTrace ]\n"); Thread * pThreadToWalk = ThreadStore::GetCurrentThread(); PTR_VOID pFrame = pThreadToWalk->GetTransitionFrameForStackTrace(); InternalInit(pThreadToWalk, GetPInvokeTransitionFrame(pFrame)); }
RNamedObject::RNamedObject(LPCTSTR prefix, const GUID& guid):name_(NULL){ //RASSERT1(prefix); TCHAR guid_str[40] = {0}; ::StringFromGUID2(guid, guid_str, 40); ::CharUpper(guid_str); InternalInit(prefix, guid_str); }
void CHeaderInfoEnum::AddHeaderInfo(IUOLFoneClientHeaderInfo* pHeaderInfo) { pHeaderInfo->AddRef(); m_collHeaderInfo.push_back(pHeaderInfo); InternalInit(); }
void ProgramClick::Init(WORD _PreKey, const Vec2i &_ScreenCoord) { InternalInit(); ScreenCoord = _ScreenCoord; RightClick = false; PreKey = _PreKey; Name = String("Click <") + ScreenCoord.CommaSeparatedString() + String("PreKey: ") + String(PreKey) + String(">"); }
void ProgramClick::Init(const String &_PreStatement, const Vec2i &_ScreenCoord) { InternalInit(); ScreenCoord = _ScreenCoord; RightClick = false; PreStatement = _PreStatement; Name = String("Click <") + ScreenCoord.CommaSeparatedString() + String("PreStatement: ") + PreStatement + String(">"); }
void ProgramClick::Init(const Vec2i &_ScreenCoord, bool _RightClick) { InternalInit(); ScreenCoord = _ScreenCoord; RightClick = _RightClick; if(RightClick) { Name = String("Right Click <") + ScreenCoord.CommaSeparatedString() + String(">"); } else { Name = String("Click <") + ScreenCoord.CommaSeparatedString() + String(">"); } }
void cFMTimeLineAnimationRule::Init() { m_fCurrentProgress = 0.f; m_bInitCalled = true; m_bStart = false; m_fPastTime = 0.f; m_iCurrentPlayCount = 0; if( m_fTotalPlayTime == 0.f ) { m_fTotalPlayTime = this->GetEndTime(); } if( m_fTotalPlayTime == 0.f ) m_iCurrentPlayCount = 0; InternalInit(); //if( e_fElpaseTime !=0.f ) // Update(e_fElpaseTime); }
void ScrollBar::OnSetterChanged(suic::SetterChangedEventArg& e) { if (e.GetName().Equals(_T("ShowFirstButton"))) { _decreaseBtn.SetVisible(e.GetSetter()->ToBool()); } else if (e.GetName().Equals(_T("ShowSecondButton"))) { _increaseBtn.SetVisible(e.GetSetter()->ToBool()); } else { __super::OnSetterChanged(e); if (e.GetName().Equals(suic::WIDTH) || e.GetName().Equals(suic::HEIGHT)) { InternalInit(); } } }
//initializes the command line parser given a series of multiple //strings //(dos style) bool CCommandLineParser::Init(uint32 nArgCount, char** ppszArgStrings, char nDesignator) { //clean up old stuff Free(); //we need to run through all the strings, and build up the size //of the total string we will need uint32 nTotalSize = 0; uint32 nCurrStr = 0; for(; nCurrStr < nArgCount; nCurrStr++) { //add an extra character to insert a space on the end nTotalSize += strlen(ppszArgStrings[nCurrStr]) + 1; } //allocate the string m_pszCommandLine = new char[nTotalSize + 1]; //make sure the memory was allocated ok if(m_pszCommandLine == NULL) { return false; } //init the string to be empty m_pszCommandLine[0] = '\0'; //now copy over all the strings uint32 nCurrPos = 0; for(nCurrStr = 0; nCurrStr < nArgCount; nCurrStr++) { strcat(m_pszCommandLine, ppszArgStrings[nCurrStr]); strcat(m_pszCommandLine, " "); } //now pass it on to the internal constructor return InternalInit(nDesignator); }
//initializes the command line parser given an entire string //(windows style) bool CCommandLineParser::Init(const char* pszCommandLine, char nDesignator) { //clean up the old stuff Free(); //first off, we need to create our own internal copy of the string uint32 nStrLen = strlen(pszCommandLine); //allocate the memory m_pszCommandLine = new char[nStrLen + 1]; //make sure the memory was allocated ok if(m_pszCommandLine == NULL) { return false; } //copy the string over strcpy(m_pszCommandLine, pszCommandLine); //now pass along to our internal initializer return InternalInit(nDesignator); }
FTP_Request::FTP_Request(MessageHandler* msg_handler) : ProtocolComm(msg_handler, NULL, NULL) { InternalInit(); }
PTR_VOID StackFrameIterator::HandleExCollide(PTR_ExInfo pExInfo, PTR_VOID collapsingTargetFrame) { STRESS_LOG3(LF_STACKWALK, LL_INFO10000, " [ ex collide ] kind = %d, pass = %d, idxCurClause = %d\n", pExInfo->m_kind, pExInfo->m_passNumber, pExInfo->m_idxCurClause); UInt32 curFlags = m_dwFlags; // If we aren't invoking a funclet (i.e. idxCurClause == -1), and we're doing a GC stackwalk, we don't // want the 2nd-pass collided behavior because that behavior assumes that the previous frame was a // funclet, which isn't the case when taking a GC at some points in the EH dispatch code. So we treat it // as if the 2nd pass hasn't actually started yet. if ((pExInfo->m_passNumber == 1) || (pExInfo->m_idxCurClause == 0xFFFFFFFF)) { ASSERT_MSG(!(curFlags & ApplyReturnAddressAdjustment), "did not expect to collide with a 1st-pass ExInfo during a EH stackwalk"); InternalInit(m_pThread, pExInfo->m_pExContext, curFlags); m_pNextExInfo = pExInfo->m_pPrevExInfo; CalculateCurrentMethodState(); ASSERT(IsValid()); if ((pExInfo->m_kind == EK_HardwareFault) && (curFlags & RemapHardwareFaultsToSafePoint)) GetCodeManager()->RemapHardwareFaultToGCSafePoint(&m_methodInfo, &m_codeOffset); } else { // // Copy our state from the previous StackFrameIterator // this->UpdateFromExceptionDispatch((PTR_StackFrameIterator)&pExInfo->m_frameIter); // Sync our 'current' ExInfo with the updated state (we may have skipped other dispatches) ResetNextExInfoForSP(m_RegDisplay.GetSP()); if ((m_dwFlags & ApplyReturnAddressAdjustment) && (curFlags & ApplyReturnAddressAdjustment)) { // Counteract our pre-adjusted m_ControlPC, since the caller of this routine will apply the // adjustment again once we return. m_ControlPC = AdjustReturnAddressForward(m_ControlPC); } m_dwFlags = curFlags; if ((m_ControlPC != 0) && // the dispatch in ExInfo could have gone unhandled (m_dwFlags & CollapseFunclets)) { CalculateCurrentMethodState(); ASSERT(IsValid()); if (GetCodeManager()->IsFunclet(&m_methodInfo)) { // We just unwound out of a funclet, now we need to keep unwinding until we find the 'main // body' associated with this funclet and then unwind out of that. collapsingTargetFrame = m_FramePointer; } else { // We found the main body, now unwind out of that and we're done. // In the case where the caller *was* the main body, we didn't need to set // collapsingTargetFrame, so it is zero in that case. ASSERT(!collapsingTargetFrame || (collapsingTargetFrame == m_FramePointer)); NextInternal(); collapsingTargetFrame = 0; } } } return collapsingTargetFrame; }
void CClosableTabCtrl::PreSubclassWindow() { CTabCtrl::PreSubclassWindow(); InternalInit(); }
SSL_Record_Base::SSL_Record_Base() { InternalInit(); }
CDuiAutoComplete::CDuiAutoComplete() { InternalInit(); }
IMU::IMU( SerialPort *pport, uint8_t update_rate_hz ) { InternalInit(pport,update_rate_hz,STREAM_CMD_STREAM_TYPE_YPR); }
IMU::IMU( SerialPort *pport, uint8_t update_rate_hz, char stream_type ) { InternalInit(pport,update_rate_hz,stream_type); }
namespace Wifi { String CWifiInfo::TAG("WifiInfo"); HashMap<SupplicantState, NetworkInfoDetailedState> CWifiInfo::mStateMap; String CWifiInfo::LINK_SPEED_UNITS = String("Mbps"); Int32 CWifiInfo::mInitFlag = InternalInit(); CWifiInfo::CWifiInfo() : mNetworkId(0) , mHiddenSSID(FALSE) , mRssi(0) , mLinkSpeed(0) , mMeteredHint(FALSE) {} ECode CWifiInfo::constructor() { mWifiSsid = NULL; mBSSID = NULL; mNetworkId = -1; mSupplicantState = SupplicantState_UNINITIALIZED; mRssi = -9999; mLinkSpeed = -1; mHiddenSSID = FALSE; return NOERROR; } ECode CWifiInfo::constructor( /* [in] */ Boolean fake) { mNetworkId = (-1); mHiddenSSID = (FALSE); mRssi = (-9999); mLinkSpeed = (-1); mMeteredHint = (FALSE); AutoPtr<IWifiSsidHelper> helper; CWifiSsidHelper::AcquireSingleton((IWifiSsidHelper**)&helper); helper->CreateFromAsciiEncoded(String(""), (IWifiSsid**)&mWifiSsid); mBSSID = String(""); mSupplicantState = SupplicantState_UNINITIALIZED; return NOERROR; } ECode CWifiInfo::constructor( /* [in] */ IWifiInfo* source) { if (source != NULL) { source->GetSupplicantState(&mSupplicantState); source->GetBSSID(&mBSSID); source->GetWifiSsid((IWifiSsid**)&mWifiSsid); source->GetNetworkId(&mNetworkId); source->GetHiddenSSID(&mHiddenSSID); source->GetRssi(&mRssi); source->GetLinkSpeed(&mLinkSpeed); Int32 ipAddres; source->GetIpAddress(&ipAddres); if (ipAddres != 0) { NetworkUtils::Int32ToInetAddress(ipAddres, (IInetAddress**)&mIpAddress); } source->GetMacAddress(&mMacAddress); source->GetMeteredHint(&mMeteredHint); } return NOERROR; } ECode CWifiInfo::SetSSID( /* [in] */ IWifiSsid* wifiSsid) { mWifiSsid = wifiSsid; // network is considered not hidden by default mHiddenSSID = FALSE; return NOERROR; } ECode CWifiInfo::GetSSID( /* [out] */ String* ssid) { VALIDATE_NOT_NULL(ssid); if (mWifiSsid != NULL) { String unicode; mWifiSsid->ToString(&unicode); AutoPtr<ICharSequence> tmp; CString::New(unicode, (ICharSequence**)&tmp); if (!TextUtils::IsEmpty(tmp)) { *ssid = String("\"") + unicode + String("\""); return NOERROR; } else { return mWifiSsid->GetHexString(ssid); } } *ssid = IWifiSsid::NONE; return NOERROR; } ECode CWifiInfo::GetWifiSsid( /* [in] */ IWifiSsid** ssid) { VALIDATE_NOT_NULL(ssid); *ssid = mWifiSsid; REFCOUNT_ADD(*ssid); return NOERROR; } ECode CWifiInfo::SetBSSID( /* [in] */ const String& BSSID) { mBSSID = BSSID; return NOERROR; } ECode CWifiInfo::GetBSSID( /* [out] */ String* bssid) { VALIDATE_NOT_NULL(bssid); *bssid = mBSSID; return NOERROR; } ECode CWifiInfo::GetRssi( /* [out] */ Int32* rssi) { VALIDATE_NOT_NULL(rssi); *rssi = mRssi; return NOERROR; } ECode CWifiInfo::SetRssi( /* [in] */ Int32 rssi) { mRssi = rssi; return NOERROR; } ECode CWifiInfo::GetLinkSpeed( /* [out] */ Int32* speed) { VALIDATE_NOT_NULL(speed); *speed = mLinkSpeed; return NOERROR; } ECode CWifiInfo::SetLinkSpeed( /* [in] */ Int32 linkSpeed) { mLinkSpeed = linkSpeed; return NOERROR; } ECode CWifiInfo::SetMacAddress( /* [in] */ const String& macAddress) { mMacAddress = macAddress; return NOERROR; } ECode CWifiInfo::GetMacAddress( /* [in] */ String* address) { VALIDATE_NOT_NULL(address); *address = mMacAddress; return NOERROR; } ECode CWifiInfo::SetMeteredHint( /* [in] */ Boolean meteredHint) { mMeteredHint = meteredHint; return NOERROR; } ECode CWifiInfo::GetMeteredHint( /* [out] */ Boolean* hint) { VALIDATE_NOT_NULL(hint); *hint = mMeteredHint; return NOERROR; } ECode CWifiInfo::SetNetworkId( /* [in] */ Int32 id) { mNetworkId = id; return NOERROR; } ECode CWifiInfo::GetNetworkId( /* [out] */ Int32* id) { VALIDATE_NOT_NULL(id); *id = mNetworkId; return NOERROR; } ECode CWifiInfo::GetSupplicantState( /* [out] */ SupplicantState* state) { VALIDATE_NOT_NULL(state); *state = mSupplicantState; return NOERROR; } ECode CWifiInfo::SetSupplicantState( /* [in] */ SupplicantState state) { mSupplicantState = state; return NOERROR; } ECode CWifiInfo::SetInetAddress( /* [in] */ IInetAddress* address) { mIpAddress = address; return NOERROR; } ECode CWifiInfo::GetIpAddress( /* [out] */ Int32* address) { VALIDATE_NOT_NULL(address); if (mIpAddress == NULL || IInet6Address::Probe(mIpAddress) != NULL) { *address = 0; return NOERROR; } return NetworkUtils::InetAddressToInt32(mIpAddress, address); } ECode CWifiInfo::GetHiddenSSID( /* [out] */ Boolean* ssid) { VALIDATE_NOT_NULL(ssid); *ssid = mHiddenSSID; return NOERROR; } ECode CWifiInfo::SetHiddenSSID( /* [in] */ Boolean hiddenSSID) { mHiddenSSID = hiddenSSID; return NOERROR; } NetworkInfoDetailedState CWifiInfo::GetDetailedStateOf( /* [in] */ SupplicantState suppState) { return mStateMap[suppState]; } void CWifiInfo::SetSupplicantState( /* [in] */ const String& stateName) { mSupplicantState = ValueOf(stateName); } SupplicantState CWifiInfo::ValueOf( /* [in] */ const String& stateName) { if (String("4WAY_HANDSHAKE").EqualsIgnoreCase(stateName) == 0) return SupplicantState_FOUR_WAY_HANDSHAKE; else { // try { /* SupplicantState.valueOf(stateName.ToUpperCase())*/ String tmp = stateName.ToUpperCase(); return StringUtils::ParseInt32(tmp); // } catch (IllegalArgumentException e) { // return SupplicantState.INVALID; // } } } ECode CWifiInfo::RemoveDoubleQuotes( /* [in] */ const String& str, /* [out] */ String* value) { VALIDATE_NOT_NULL(value); if (str.IsNull()) return NOERROR; AutoPtr<ArrayOf<Char32> > charArray = str.GetChars(); const Int32 length = charArray->GetLength(); if ((length > 1) && ((*charArray)[0] == '"') && ((*charArray)[length - 1] == '"')) { *value = str.Substring(1, length - 1); return NOERROR; } *value = str; return NOERROR; } // @Override ECode CWifiInfo::ToString( /* [out] */ String* str) { StringBuffer sb; String none("<none>"); sb.Append("SSID: "); String sidStr; mWifiSsid->ToString(&sidStr); sb.Append(mWifiSsid == NULL ? IWifiSsid::NONE : sidStr); sb.Append(", BSSID: "); sb.Append(mBSSID.IsNull() ? none : mBSSID); sb.Append(", MAC: "); sb.Append(mMacAddress.IsNull() ? none : mMacAddress); sb.Append(", Supplicant state: "); if (mSupplicantState == NULL) sb.Append(none); sb.Append(mSupplicantState); sb.Append(", RSSI: "); sb.Append(mRssi); sb.Append(", Link speed: "); sb.Append(mLinkSpeed); sb.Append(", Net ID: "); sb.Append(mNetworkId); sb.Append(", Metered hint: "); sb.AppendBoolean(mMeteredHint); *str = sb.ToString(); return NOERROR; } /** Implement the Parcelable interface {@hide} */ Int32 CWifiInfo::DescribeContents() { return 0; } /** Implement the Parcelable interface {@hide} */ ECode CWifiInfo::WriteToParcel( /* [in] */ IParcel* dest) { dest->WriteInt32(mNetworkId); dest->WriteInt32(mRssi); dest->WriteInt32(mLinkSpeed); if (mIpAddress != NULL) { dest->WriteByte((byte)1); AutoPtr<ArrayOf<Byte> > address; mIpAddress->GetAddress((ArrayOf<Byte>**)&address); dest->WriteArrayOf((Handle32)address.Get()); } else { dest->WriteByte((byte)0); } if (mWifiSsid != NULL) { dest->WriteInt32(1); IParcelable::Probe(mWifiSsid.Get())->WriteToParcel(dest); } else { dest->WriteInt32(0); } dest->WriteString(mBSSID); dest->WriteString(mMacAddress); dest->WriteBoolean(mMeteredHint); dest->WriteInt32(mSupplicantState); return NOERROR; } ECode CWifiInfo::ReadFromParcel( /* [in] */ IParcel* source) { source->ReadInt32(&mNetworkId); source->ReadInt32(&mRssi); source->ReadInt32(&mLinkSpeed); Byte b; source->ReadByte(&b); if (b == (byte)1) { AutoPtr<ArrayOf<Byte> > address; source->ReadArrayOf((Handle32*)&address); AutoPtr<IInetAddressHelper> helpler; CInetAddressHelper::AcquireSingleton((IInetAddressHelper**)&helpler); helpler->GetByAddress(address, (IInetAddress**)&mIpAddress); } Int32 value; source->ReadInt32(&value); mWifiSsid = NULL; if (value == 1) { CWifiSsid::New((IWifiSsid**)&mWifiSsid); IParcelable::Probe(mWifiSsid.Get())->ReadFromParcel(source); } source->ReadString(&mBSSID); source->ReadString(&mMacAddress); source->ReadBoolean(&mMeteredHint); source->ReadInt32(&mSupplicantState); return NOERROR; } Int32 CWifiInfo::InternalInit() { mStateMap[SupplicantState_DISCONNECTED] = NetworkInfoDetailedState_DISCONNECTED; mStateMap[SupplicantState_INTERFACE_DISABLED] = NetworkInfoDetailedState_DISCONNECTED; mStateMap[SupplicantState_INACTIVE] = NetworkInfoDetailedState_IDLE; mStateMap[SupplicantState_SCANNING] = NetworkInfoDetailedState_SCANNING; mStateMap[SupplicantState_AUTHENTICATING] = NetworkInfoDetailedState_CONNECTING; mStateMap[SupplicantState_ASSOCIATING] = NetworkInfoDetailedState_CONNECTING; mStateMap[SupplicantState_ASSOCIATED] = NetworkInfoDetailedState_CONNECTING; mStateMap[SupplicantState_FOUR_WAY_HANDSHAKE] = NetworkInfoDetailedState_AUTHENTICATING; mStateMap[SupplicantState_GROUP_HANDSHAKE] = NetworkInfoDetailedState_AUTHENTICATING; mStateMap[SupplicantState_COMPLETED] = NetworkInfoDetailedState_OBTAINING_IPADDR; mStateMap[SupplicantState_DORMANT] = NetworkInfoDetailedState_DISCONNECTED; mStateMap[SupplicantState_UNINITIALIZED] = NetworkInfoDetailedState_IDLE; mStateMap[SupplicantState_INVALID] = NetworkInfoDetailedState_FAILED; return 0; } } // namespace Wifi
StackFrameIterator::StackFrameIterator(Thread * pThreadToWalk, PTR_VOID pInitialTransitionFrame) { STRESS_LOG0(LF_STACKWALK, LL_INFO10000, "----Init---- [ GC ]\n"); ASSERT(!pThreadToWalk->DangerousCrossThreadIsHijacked()); InternalInit(pThreadToWalk, GetPInvokeTransitionFrame(pInitialTransitionFrame)); }
StackFrameIterator::StackFrameIterator(Thread * pThreadToWalk, PTR_PAL_LIMITED_CONTEXT pCtx) { STRESS_LOG0(LF_STACKWALK, LL_INFO10000, "----Init---- [ hijack ]\n"); InternalInit(pThreadToWalk, pCtx, 0); }
RNamedObject::RNamedObject(LPCTSTR prefix, LPCTSTR name):name_(NULL){ //RASSERT1(prefix); //RASSERT1(name); InternalInit(prefix, name); }
CCustomAutoComplete::CCustomAutoComplete(const CStringArray &astrItemList) { InternalInit(); SetList(astrItemList); }
CCustomAutoComplete::CCustomAutoComplete() { InternalInit(); }