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
R

RobJones

@RobJones
About
Posts
599
Topics
188
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • WMI remote registry
    R RobJones

    Thanks! I didn't know about that other method of connecting to the registry, I will give that a shot. Thank you, Rob

    Whoever said nothing is impossible never tried slamming a revolving door!

    C / C++ / MFC c++ windows-admin tools tutorial question

  • WMI remote registry
    R RobJones

    Hello, I have spent weeks researching how to read/write remote registry values through WMI (StdRegProv). All examples out there are script based. Currently I am able to connect/authenticate to a remote machine, pull standard WMI information like OS, CPU etc.. but reading/writing to the registry seems to be a totally different animal. Has anyone had any experience using WMI with C++ to read/write remote registry values? Thanks in advance, Rob

    Whoever said nothing is impossible never tried slamming a revolving door!

    C / C++ / MFC c++ windows-admin tools tutorial question

  • copy/swap vector between threads...
    R RobJones

    That sounds like an interesting solution, I may have to give that a go... Thanks, Rob

    Whoever said nothing is impossible never tried slamming a revolving door!

    C / C++ / MFC graphics tutorial question

  • copy/swap vector between threads...
    R RobJones

    I have 2 threads that are pulling different portions of the data set. I wanted to merge the data into a single place to make it easier to work with and it seemed like a good idea to copy the whole vector from ThreadA (it does most the work) then iterate it and match it against the data in ThreadB. It may be easier to just break up the data and leave it in the threads. Thanks for the reply, - Rob

    Whoever said nothing is impossible never tried slamming a revolving door!

    C / C++ / MFC graphics tutorial question

  • copy/swap vector between threads...
    R RobJones

    Is it possible to swap vectors between threads using std::swap() instead of iterating one vector and copying each element (given that both vectors contain the exact same type of elements)? For example I have a structure/vector in my CMainFrame and in my CWinThread...

    const struct s_list
    {
    CString strTimeStamp,
    strStatus,
    strID,
    strIPRange,
    strIPAddress,
    strName,
    strGUID,
    strOS,
    strResults;

    BOOL	bUDPReply,
    	bAgent;
    

    };
    std::vector<s_list> v_list;

    I am assuming it would be more efficient if I could swap the elements... The iteration/copy method works but it takes a good 30 seconds and hangs the application while its plowing through all the data. Any ideas? Thanks, Rob

    Whoever said nothing is impossible never tried slamming a revolving door!

    C / C++ / MFC graphics tutorial question

  • vector question
    R RobJones

    Perfect. Thank you!

    Whoever said nothing is impossible never tried slamming a revolving door!

    C / C++ / MFC question graphics tutorial

  • vector question
    R RobJones

    Is there any easy way to shift or swap elements inside vector? For example if I have a vector that contains: A B C D E F and I want to swap elements B and C to read A C B D E F Thanks in advance! -Rob

    Whoever said nothing is impossible never tried slamming a revolving door!

    C / C++ / MFC question graphics tutorial

  • CopyFile
    R RobJones

    Good idea, I was thinking about that earlier, but for some reason I thought you needed to assign a drive letter (which i didn't want to do) but i see now that you don't. Thanks, Rob

    Whoever said nothing's impossible never tried slamming a revolving door!

    C / C++ / MFC algorithms security

  • CopyFile
    R RobJones

    Hello, I'm trying to find a function where you could Copy a file from a UNC path to a UNC path and be able to supply the function with a domain\user and password. I have been searching MSDN for the past couple hours with no luck. I know if you simply supply a UNC path it will prompt for authentication but I want to automate this. Thanks for any suggestions, Rob

    Whoever said nothing's impossible never tried slamming a revolving door!

    C / C++ / MFC algorithms security

  • NetWkstaGetInfo() Question
    R RobJones

    I specify it like.... L"\\\\machine". I'm going to test it at work today on a few other machines. Just thought it was weird that simply switching between IP and machine name would cause that error. Whoever said nothing's impossible never tried slamming a revolving door!

    C / C++ / MFC help question debugging performance

  • NetWkstaGetInfo() Question
    R RobJones

    Hello, I am using the following to pull the domain/workgroup name of a remote computer. This works just fine when I use the remote computers IP address but if I use the machine name it fails with an access is denied error. Has anyone experienced the same problem or does anyone have any ideas why this is happening?

    DWORD dwLevel = 100;
    LPWKSTA\_INFO\_100 pBuf = NULL;
    NET\_API\_STATUS nStatus;
    
    nStatus = NetWkstaGetInfo(L"\\\\\\\\192.168.1.2", dwLevel, (LPBYTE \*)&pBuf);
    
    if (nStatus == NERR\_Success)
    {
    	TRACE(L"Name:\\t\\t%s\\n",		pBuf->wki100\_computername);
    	TRACE("Platform:\\t%d\\n",	pBuf->wki100\_platform\_id);
    	TRACE(L"Domain:\\t\\t%s\\n",	pBuf->wki100\_langroup);
    }
    else
    {
    	char error\[1024\];
    	FormatMessage(FORMAT\_MESSAGE\_FROM\_SYSTEM, NULL, nStatus, NULL, error, sizeof(error), NULL);
    	TRACE("Error: %s", error);
    }
    
    // Free the allocated memory.
    if (pBuf != NULL)
    	NetApiBufferFree(pBuf);
    

    Thanks, Rob Whoever said nothing's impossible never tried slamming a revolving door!

    C / C++ / MFC help question debugging performance

  • CFileDialog & GetOpenFileName
    R RobJones

    I was able to get a patch from Microsoft and it did fix the pdfshell issues. Thanks for all your help! Rob Whoever said nothing's impossible never tried slamming a revolving door! "5 out of 4 people have problems with fractions." - Albert Einstein

    C / C++ / MFC help question csharp c++ sysadmin

  • CFileDialog & GetOpenFileName
    R RobJones

    Yeah I found that one the other day too... Didn't make any difference... Microsoft has a patch but you have to call their support line to request it. I'm going to have work call and get the patch I think they have a support contract. Thanks again for helping! Rob Whoever said nothing's impossible never tried slamming a revolving door!

    C / C++ / MFC help question csharp c++ sysadmin

  • CFileDialog & GetOpenFileName
    R RobJones

    Finally I found out what is causing the issue!! Now to try to figure out a work around... After tons of searching on the net people were saying there is a shell bug with Adobe Reader 7.0 and to uninstall it to see if the bug goes away and IT DID! Now is there a way to force the application to not load the acrobat dll? In the debugger I would see the CFileDialog load pdfshell.dll and then unload, on the second load if I do a mouse over to display the tool tip it would crash my app. Whoever said nothing's impossible never tried slamming a revolving door! -- modified at 14:34 Wednesday 26th April, 2006

    C / C++ / MFC help question csharp c++ sysadmin

  • CFileDialog & GetOpenFileName
    R RobJones

    The R2 SDK didn't help.. I have narrowed this down though... It only crashes when I mouse over a file name it crashes right before it displays the tooltip... Very weird... Whoever said nothing's impossible never tried slamming a revolving door!

    C / C++ / MFC help question csharp c++ sysadmin

  • CFileDialog & GetOpenFileName
    R RobJones

    I just found out Microsoft release a 2nd revision of the SDK that is causing a lot of issues. I am going to try that now... Man I hope they fixed this. Whoever said nothing's impossible never tried slamming a revolving door!

    C / C++ / MFC help question csharp c++ sysadmin

  • CFileDialog & GetOpenFileName
    R RobJones

    This is an administration application and we only run it on 2 workstations both are Windows XP and it's failing on both. In debug mode I see the exception but in release mode it just closes the application with out any errors. My application is currently statically linked with MFC. I did just find this on the MSDN forums http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=154126&SiteID=1 They claim this problem was fixed with version 7.1 but I am running v7.1.3088 and I still have the issue... I went into afxdlgs.h and OPENFILENAME is currently defined as __declspec(property(get=GetOFN)) OPENFILENAME m_ofn; Strange. [Had to edit the URL] Whoever said nothing's impossible never tried slamming a revolving door! -- modified at 12:30 Wednesday 26th April, 2006

    C / C++ / MFC help question csharp c++ sysadmin

  • CFileDialog & GetOpenFileName
    R RobJones

    Hello, I am still stuck on something I posted a question about a couple of weeks ago (I thought I figured it out but that isn't the case). I am using VC++ 2003 .NET. I believe that I did install the Windows 2003 Server SDK but I am not sure how I can tell, I don't see it listed in add-remove programs nor under updates. Anyway, I have tried to use both CFileDialog and GetOpenFileName and both cause a First-chance exception. The exception doesn't happen the first time the file dialog is displayed but it will always happen the 2nd time its displayed. The error is listed below. I have done tons of research on the net and it appears that a lot of other people are having the same problem but I havent seen any resolutions that actually work (most suggest its a problem caused by the Windows 2003 Server SDK).

    Heres the error:
    First-chance exception at 0x7ca51406 in SiteConsole.exe:
    0xC0000005:
    Access violation reading location 0x016d4980.

    Debugging hasn't lead me anywhere...

    Heres the code: it's pretty straight forward.
    void CExcludeDlg::OnBnClickedBImport()
    {
    UpdateData(TRUE);

    /* I can use either GetOpenFileName or CFileDialog and both cause the exception.
    OPENFILENAME ofn;
    TCHAR pszFile[MAX_PATH*2];

    \_tcscpy(pszFile, \_T("") );
    memset(&ofn, 0, sizeof(ofn));
    
    ofn.lStructSize = sizeof(ofn);    // I think this is the problem because of the SDK
    ofn.hwndOwner	= GetSafeHwnd();
    ofn.lpstrFile	= pszFile;
    ofn.nMaxFile	= sizeof(pszFile);
    ofn.Flags		= OFN\_FILEMUSTEXIST | OFN\_HIDEREADONLY | OFN\_NONETWORKBUTTON | OFN\_FILEMUSTEXIST;
    ofn.lpstrFilter = \_T("All Files (\*.\*)\\0\*.\*\\0Executables (\*.exe;\*.ocx;\*.dll)\\0\*.exe;\*.ocx;\*.dll\\0");
    ofn.lpstrTitle	= \_T("Please select a file");
    
    if (GetOpenFileName( &ofn ))
    {
    	// I don't have to do anything it will still crash.
    }
    

    */
    static char BASED_CODE szFilter[] = _T("Text File (*.txt)|*.txt||");
    CFileDialog m_ldFile(TRUE, _T(".txt"), NULL, OFN_HIDEREADONLY, szFilter);
    if (m_ldFile.DoModal() == IDOK)
    {
    // I don't have to do anything it will still crash.
    }

    UpdateData(FALSE);
    

    }

    On a side note how can I uninstall windows 2003 server SDK? This may fix the problem. Thanks! Rob Whoever said nothing's impossible never tried slamming a revolving door!

    C / C++ / MFC help question csharp c++ sysadmin

  • First-chance exception CFileDialog
    R RobJones

    After doing alot of research on the net I found that quite a few others are having the same issues and everyone suggested to use GetOpenFileName instead... I have implemented that and everything seems to be working fine. Thanks for all the suggestions! Rob Whoever said nothing's impossible never tried slamming a revolving door!

    C / C++ / MFC graphics debugging help question announcement

  • First-chance exception CFileDialog
    R RobJones

    Sorry I ment to say the 'Open' button on the CFileDialog.. Whoever said nothing's impossible never tried slamming a revolving door!

    C / C++ / MFC graphics debugging help question announcement
  • Login

  • Don't have an account? Register

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