Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
V

viperlogic

@viperlogic
About
Posts
58
Topics
21
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • empty fields in CIPAddresCtrl
    V viperlogic

    i want to check if one field is left empty, BYTE Field_1a, Field_1b, Field_1c, Field_1d; updatedata() cipaddress.getaddress(Field_1a, Field_1b, Field_1c, Field_1d) if (Field_1a == NULL) MessageBox("Error") the problem is if the field is left empty the if statement is not run. what shoud i be checking to see if the field is empty? thanks

    C / C++ / MFC help question

  • microsoft GUI standards
    V viperlogic

    im looking for a place where i can find a list/guide of the microsoft standards for a GUI eg how many DU's between radio button etc thanks

    C / C++ / MFC tutorial

  • save data as csv or excel
    V viperlogic

    CString m_Make="a"; CString m_Model ="b"; CString m_Year ="c"; CString m_Mileage ="d"; CString m_Owner="e"; for testing purposes i have them as above, so where is this box coming from!!!

    C / C++ / MFC c++ question

  • save data as csv or excel
    V viperlogic

    still get the boxes as seen below a,b,c,d,e

    C / C++ / MFC c++ question

  • save data as csv or excel
    V viperlogic

    im wanna go down the csv route. i am using the CArchive as follows CFile f; char strFilter[] = { "csv Files (*.csv)|*.csv|All Files (*.*)|*.*||" }; CFileDialog FileDlg(FALSE, ".csv", NULL, 0, strFilter); if( FileDlg.DoModal() == IDOK ) { f.Open(FileDlg.GetFileName(), CFile::modeCreate | CFile::modeWrite); CArchive ar(&f, CArchive::store); ar<< m_Make << m_Model << m_Year << m_Mileage << m_Owner; ar.Close(); } else return; f.Close(); the above is coming out in one cell with a rectangular box after each string how do i get ride of those retangular boxes and have a string in a seperate cell thanks

    C / C++ / MFC c++ question

  • save data as csv or excel
    V viperlogic

    how did you write the data out thou, i see there is CArchive but doesnt appear to do much!!

    C / C++ / MFC c++ question

  • save data as csv or excel
    V viperlogic

    im using VC++6 MFC, i want to create and save some data out to a file such as a csv file or even better a excel file. I know of CFileDialog to bring up a save dialog but how do i pump out data in a csv or excel format thanks

    C / C++ / MFC c++ question

  • disable/grey out date time picker
    V viperlogic

    thanks all, enablewindow works perfect, dont know why i didnt think of that!! i was trying to the the EN_******** to use with a sendmessage!!

    C / C++ / MFC question

  • disable/grey out date time picker
    V viperlogic

    i was wondering how do you grey-out / disable the date time picker, is there a flag that can be changed say using a send message? i have my date time picker as a CDateTimeCtrl type

    C / C++ / MFC question

  • kill COM calls in thread
    V viperlogic

    i am scanning alot of hosts with this app, waiting 2mins for every host would take for ever to scan the network, hence i use the thread timeout of 3secs i just read about _endthread and it appears to work so far. is this a proper solution?

    C / C++ / MFC help question com security

  • kill COM calls in thread
    V viperlogic

    i think i have that working now. A kind of related problem i have is with the code below. This is a part of the code the thread executes, if sucessful all is ok. this thread has a timeout of 3secs. A problem is that the ConnectServer call below takes 2minutes to complete if it cant connect. when this happens the below messagebox pops ups and then the program crashes. is it crashing because the code wants to "return" but there is nothing to return to as the thread has been already killed?? How can i modify it so that it wont crash. A message box doesnt have to be displayed either. many thanks hres = pLoc_test->ConnectServer( _bstr_t(L"\\\\"+strIP1+"\\root\\cimv2"), // Object path of WMI namespace NULL, // User name. NULL = current user NULL, // User password. NULL = current 0, // Locale. NULL indicates current WBEM_FLAG_CONNECT_USE_MAX_WAIT, // Security flags 0, // Authority 0, // Context object &pSvc_test // pointer to IWbemServices proxy ); if (FAILED(hres)) { char error_msg[64]; sprintf(error_msg, "wmi_test: Could not connect. Error code = 0x%x", hres); MessageBox(error_msg , "Error" , MB_ICONERROR | MB_OK); pLoc_test->Release(); return; }

    C / C++ / MFC help question com security

  • kill COM calls in thread
    V viperlogic

    so i use the following to delete a thread from outside?? Does "delete pThread" call ExitThread?? switch(WaitForSingleObject(pThread->m_hThread, 3000)) { case WAIT_TIMEOUT: { delete pThread; break; } case WAIT_OBJECT_0: { // thread has terminated on its own break; } }

    C / C++ / MFC help question com security

  • kill COM calls in thread
    V viperlogic

    sorry, i dont understand, example please thanks

    C / C++ / MFC help question com security

  • kill COM calls in thread
    V viperlogic

    what command do i use to kill the thread thou from outside the thread?

    C / C++ / MFC help question com security

  • kill COM calls in thread
    V viperlogic

    i have a thread that calls the following CoInitializeEx() CoInitializeSecurity() CoCreateInstance() ConnectServer() if the thread isnt successful in 3secs (using WaitForSingleObject(pThread->m_hThread, 3000)) it is closed. what is the best way of killing a thread from outside the thread, i am using TerminateThread() but i dont think this is the best way?? it appears thou that the calls in the thread are not being killed off because if i go to start the thread again CoInitializeSecurity() throws up an error saying that it cant initialize security. so iam assuming it is saying this because the thread wasnt killed off right plz help

    C / C++ / MFC help question com security

  • Marshalling
    V viperlogic

    so will i get away with using CoInitializeEx() with COINIT_MULTITRHEADED and not having to use marshalling?

    C / C++ / MFC c++ com help tutorial

  • Marshalling
    V viperlogic

    hi i have a vc++6 MFC app. in my main i start a thread that connects to the wmi of a host, it uses IWbemLocator *pLoc IWbemServices *pSvc back in the main, once the thread has finished connecting to the wmi of the host, it is queryied but the two global variables above are "empty", this is because you cannot use COM interfaces on multiple threads and each thread must initialize COM itself and onyl use local COM objects afaik. so i think marshalling will have to be used but i dont know where to start on how to implement it please help

    C / C++ / MFC c++ com help tutorial

  • AfxBeginThread
    V viperlogic

    thx, that worked can explain why thou?

    C / C++ / MFC question

  • AfxBeginThread
    V viperlogic

    ok this is what i have.. static UINT CScanDlg::ThreadProc(LPVOID pParam); delcared in the header file AfxBeginThread(ThreadProc,NULL,THREAD_PRIORITY_NORMAL,0,0,NULL); UINT CScanDlg::ThreadProc(LPVOID pParam) { if(wmi(strIP1)) return 0; else return 1; } i get the following error CScanDlg::wmi' : illegal call of non-static member function

    C / C++ / MFC question

  • AfxBeginThread
    V viperlogic

    thx for the replys i am having trouble implementing AfxBeginThread() void CScanDlg::OnButtonScan() { AfxBeginThread(ThreadProc); } UINT CScanDlg::ThreadProc(LPVOID pParam) { if(wmi(strIP1)) return 0; else return 1; } what is wrong above, sorry about these questions but this is new to me

    C / C++ / MFC question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups