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
C

carrivick

@carrivick
About
Posts
28
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • C++ to mathlab
    C carrivick

    Do you mean Matlab ?

    C / C++ / MFC tutorial c++

  • OpenRAID challenge - little off topic
    C carrivick

    Could you use a Virtual Machine to achieve this. The type of disks and their location can be divorced from the underlying hardware e.g. you can create a scsi which actually resides on external firewire drive.

    C / C++ / MFC c++ design sysadmin linux agentic-ai

  • Help out with compiler error C2327
    C carrivick

    If you are using nested class then consider using 'friend' to control acess to members of the other classes. But you will still need a pointer/reference to access the in the first place.

    C / C++ / MFC help database windows-admin question

  • Basic issue i got confused help
    C carrivick

    monsieur_jj wrote:

    pRetVal = reinterpret_cast(prop.first.lpszW);

    This is the line which is in error. Because you are performing a reinterpret_cast it will copy the pointer value but not correctly create the rest of the BSTR class, notably the length which occurs before the string array. My solution would be to change the return type to the WIDE CHAR type the same as lpszW.

    C / C++ / MFC help question

  • WinMain and argv/argc
    C carrivick

    You need to use GetCommandLine and CommandLineToArgvW like #include #include #include int __cdecl main() { LPWSTR *szArglist; int nArgs; int i; szArglist = CommandLineToArgvW(GetCommandLineW(), &nArgs); if( NULL == szArglist ) { wprintf(L"CommandLineToArgvW failed\n"); return 0; } else for( i=0; i

    C / C++ / MFC help debugging json

  • Funny timing results in threading project
    C carrivick

    Maybe overwritting your stack at some point ? Put some Sleep calls to make the execution times longer see if they follow the time you set

    C / C++ / MFC c++ question data-structures tools announcement

  • need to give the number of middle
    C carrivick

    Look more closely void main() { int n=0,k,m,j; **//n is Zero so you declare an array of zero size !** int*p=new int[n]; **// To late you update the value of n** cin>>n; k=n; j=n; m=n; for(;n>0;n--) { cin>>p[n-1]; } int x=1; while(x) { x=0; for(;k>0;k--) { **// This syntax is just wrong try to understand rather than just getting it to compile** if(p[k-1] { swap(p[k-1],p[k]); x=1; } } } **// What if only one element is enter opps were off the end of the array** if(m%2==1){cout<get this,it is also wrong.please have

    C / C++ / MFC

  • Problem in RegQueryValue.
    C carrivick

    Do you have a unicode project setting but not viewing the string as unicode ? This would explain that you would see the first character.

    C / C++ / MFC java help question

  • Convert DWORD_PTR back to my object
    C carrivick

    I'm guessing you are getting cannot convert DWORD_PTR to Instrument *. Oh and allways try and use eplicit casting i.e. static_cast rather than C-Style casts. Try this Instrument *instObject = static_cast((static_cast(treeCtrl->GetItemData(hItem)))); or if not Instrument *instObject = dynamic_cast((dynamic_cast(treeCtrl->GetItemData(hItem)))); Could you copy the exact compiler error into the thread.

    C / C++ / MFC help c++

  • need to give the number of middle
    C carrivick

    Here you go void swap(int &a,int &b); void main() { int array_size=0,k,m,j; cin>>array_size; if(array_size < 1) return; int*p=new int[array_size]; for(int i=0;i>p[i]; } // Lets do a bubble sort bool changed = true; int bubble_end = array_size - 1; while(changed) { changed = false; for(int i=0;i p[i+1]) { swap(p[i],p[i+1]); changed = true; } } } if(array_size > 1) { if(array_size%2==1) cout< -- modified at 8:50 Saturday 15th September, 2007

    C / C++ / MFC

  • How to prevent copying a file
    C carrivick

    Using the mfc CFile class CString file_name = _T("C:\\AnotherFile"); CFile f; f.Open( file_name, CFile::modeRead | CFile::shareExclusive ); while(1) Sleep(1000);

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

  • How to remove all source code symbol names from Release build
    C carrivick

    Do you have RTTI enabled ? Do you need to have it enabled ?

    C / C++ / MFC algorithms debugging tutorial question announcement

  • Projectsettings for dual core cpu's?
    C carrivick

    If you are using VS 2005 ensure that you have service pack 1 installed as this will generate code with better support for intel duo processors.

    C / C++ / MFC asp-net question

  • Problems about how to explore a program's action?
    C carrivick

    Add debug output using OutputDebugString to record what has happened. User the Windows tool ProcessExplorer to examine File handles events etc that the exe is performing.

    C / C++ / MFC question tutorial

  • Getting hold of certain event entries
    C carrivick

    The first error lies in the following line if ((LPSTR)((LPBYTE) pevlr + sizeof(EVENTLOGRECORD))=="Windows Agent") What you are performing is a pointer comparison with a static string. This is only going to work in two ways if the expression (LPSTR)((LPBYTE) pevlr + sizeof(EVENTLOGRECORD)) is used to initialise a string class like std::string or CString etc a more straight forward way is to use a string compariosn function eg strcmp or its wide equivalent if you have a Unicode project. i.e. if(strcmnp((LPSTR)((LPBYTE) pevlr + sizeof(EVENTLOGRECORD)),"Windows Agent") == 0) The other problem you might face is user priveledge as access to a system resource like the event logs may be restricted if you are not an Admin user.

    C / C++ / MFC com agentic-ai tools question

  • dynamic two dimentional array
    C carrivick

    Check the thread subject, In what way is this array dynamic ?

    C / C++ / MFC data-structures tutorial question

  • debugging a dll on command line
    C carrivick

    WinDbg has a symbol search path and a source search path. both of these need to be set up correctly. You can also download symbols for windows DLL's for various OS. You can also specify a debugger for any executable image which will get loaded automatically when the program executes. Very useful for debugging services. "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options" create a key called "debugger" with a value like "C:\Program Files\Debugging Tools for Windows\windbg.exe" -g

    C / C++ / MFC question c++ debugging json

  • Difference between debug and release builds
    C carrivick

    Speed is the main difference a debug build will by default have no optimisation, this makes it easier to debug. But you can debug a release build it is just a little harder.

    C / C++ / MFC debugging announcement

  • Unable to connect to Named Pipe
    C carrivick

    Were you passing NULL in the Secutity Attributes ?

    C / C++ / MFC help sysadmin

  • Modify tooltip - Mouse over file (.xml)
    C carrivick

    You need a shell extension http://www.codeproject.com/shell/shellextguide1.asp[^] Look for code with with QueryInfo handler (shell version 4.71+)

    C / C++ / MFC c++ linux xml 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