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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
K

ky_rerun

@ky_rerun
About
Posts
52
Topics
7
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • how to browse a remote directory using ftp client
    K ky_rerun

    This is in vb but you should get the idea ^]


    a programmer traped in a thugs body

    C# sysadmin tutorial

  • dates
    K ky_rerun

    Take a look at here


    a programmer traped in a thugs body

    C / C++ / MFC question

  • An 'If' statement before my char declaration is not allowing my program to compile......why?
    K ky_rerun

    This should never compile. You must declare arrays with literals or assign them so the complier can calculate a size. When you create this array the size of the array * the sizeof(char) will be subtracted from the stack pointer. If you want a dynamic array you have to use malloc. When you use a char * and a malloc the Size of buff is the size of a char * which will be 4 regardless of how much memory you allocate. In C you will need to maintain a separate value to indicate the size of the allocated array that is why every api function that takes an allocated buffer also takes a parameter that specifies the size of the buffer or a buffer that has a way of indicating the end element as is in a null terminator on the end of char strings.


    a programmer traped in a thugs body

    C / C++ / MFC question help

  • Need information about how to send emails in VC++
    K ky_rerun

    if MAPI is not an option its very easy to write a simple mailing functionality just look up the RFC for SMTP.


    a programmer traped in a thugs body

    C / C++ / MFC c++ json help tutorial question

  • socket programing
    K ky_rerun

    Can you ping that address?


    a programmer traped in a thugs body

    C# security beta-testing help question code-review

  • Single Textbox EventHandler for all
    K ky_rerun

    I recreated your situation Make sure you crete an instace that points to the class thats going to handle the event in this case HA HandleAccessor^ HA; this->textBox1->KeyPress += gcnew System::Windows::Forms::KeyPressEventHandler(HA, &HandleAccessor::textBox2_KeyPress);


    a programmer traped in a thugs body

    Managed C++/CLI help question

  • StreamReader delimiters in C++/CLI
    K ky_rerun

    You could just your regularexpressions and not worry with parsing it yourself.


    a programmer traped in a thugs body

    Managed C++/CLI c++ data-structures json tutorial question

  • Different Between the operator '*' and '&'
    K ky_rerun

    This is because c++ accurately always passes by value When you pass a pointer you are passing the value of the pointer which is a memory address. when the compiler creates a stack frame the value of the memory address is put on the stack as a local variable when you change the value of that variable you point it to a new memory location and no longer maps to memory address of the variable in the caller. So any change will not affect the caller since you are changing the location associated with another variable in this case another local variable which is allso on the stack.


    a programmer traped in a thugs body

    C / C++ / MFC

  • Different Between the operator '*' and '&'
    K ky_rerun

    in a declaration ie int *X means a a pointer to x named *; You cannot define a reference with initializing it so int &X //doesn't work however --- int Y; int &x = Y; does Y and X now refer to the same place in memory changing the value of one will change the value of the other. When you use a & in a function prototype we are saying I want my parameter to access memory at the location of the variable the caller specified; When you declare a pointer in the prototype you are going to explicitly pass in a pointer that pointer can however be reassigned but once reassinged the caller will no longer be able to read changes to what was passed in I wrote a little example. // CppTest.cpp : Defines the entry point for the console application. // #include "stdafx.h" void NoSideEffect(int *T) { int G = 5; T = &G; } void SideEffect(int &T) { int G = 5; T = G; } void PointerSideEffect(int *T) { int G = 10; *T = G; } int _tmain(int argc, _TCHAR* argv[]) { char buffer[2]; int X = 2; NoSideEffect(&X); printf("X is Now %d \n",X); SideEffect(X); printf("X is Now %d \n",X); PointerSideEffect(&X); printf("X is Now %d \n",X); gets(buffer); } this will print out X is Now 2 X is Now 5 X is Now 10


    a programmer traped in a thugs body

    C / C++ / MFC

  • Accessing the date from webcamera with pure C++. Is it possible?
    K ky_rerun

    I reread you question and yes It would be possible but you would have to write a driver and have some knowledge of how the webcam worked at a low level. I don't think in any of the modern OS you can have direct IO access. So if thats way you want to go I would download the driver development kit.


    a programmer traped in a thugs body

    C / C++ / MFC c++ help question

  • Accessing the date from webcamera with pure C++. Is it possible?
    K ky_rerun

    Yes you can use the WIA for many web cams other have there own API.


    a programmer traped in a thugs body

    C / C++ / MFC c++ help question

  • connect to mysql
    K ky_rerun

    Are you using the mysql data provider for .net or odbc


    a programmer traped in a thugs body

    Windows Forms csharp database mysql linux

  • Debugging Problem
    K ky_rerun

    If the dll has debuging symbols you should be able to step into it. And VS will ask you where the source code is. It may be you have a non debug version if that is the case you will need to rebuild the dll from source with symbols.


    a programmer traped in a thugs body

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

  • Memory Allocation Error 998
    K ky_rerun

    Can you build a new program that only uses malloc and see what happens. If you view the assembly does malloc actually get called. Can you post the code.


    a programmer traped in a thugs body

    C / C++ / MFC help csharp visual-studio performance question

  • How to resolve LNK2001 error (ver: VC ++ 8.0 and .net 2005)
    K ky_rerun

    did you switch a dll from being a com DLL to a managed DLL?


    a programmer traped in a thugs body

    C / C++ / MFC csharp c++ help tutorial announcement

  • Why am I not able to get handle of file?
    K ky_rerun

    ooks like this is related to delayed write. Just because you close a file does not mean the OS will write it the folowing is from the FlushFileBuffers documentation Due to disk caching interactions within the system, the FlushFileBuffers function can be inefficient when used after every write to a disk drive device when many writes are being performed separately. If an application is performing multiple writes to disk and also needs to ensure critical data is written to persistent media, the application should use unbuffered I/O instead of frequently calling FlushFileBuffers. To open a file for unbuffered I/O, call the CreateFile function with the FILE_FLAG_NO_BUFFERING and FILE_FLAG_WRITE_THROUGH flags. This prevents the file contents from being cached and flushes the metadata to disk with each write. For more information, see CreateFile. to me it looks like you need to open it in non buffering mode.


    a programmer traped in a thugs body

    C / C++ / MFC debugging help question

  • Why am I not able to get handle of file?
    K ky_rerun

    looks like this is related to delayed write. Just because you close a file does not mean the OS will write it the folowing is from the FlushFileBuffers documentation Due to disk caching interactions within the system, the FlushFileBuffers function can be inefficient when used after every write to a disk drive device when many writes are being performed separately. If an application is performing multiple writes to disk and also needs to ensure critical data is written to persistent media, the application should use unbuffered I/O instead of frequently calling FlushFileBuffers. To open a file for unbuffered I/O, call the CreateFile function with the FILE_FLAG_NO_BUFFERING and FILE_FLAG_WRITE_THROUGH flags. This prevents the file contents from being cached and flushes the metadata to disk with each write. For more information, see CreateFile. to me it looks like you need to open it in non buffering mode.


    a programmer traped in a thugs body

    C / C++ / MFC debugging help question

  • Creating graph of file usage in build tree
    K ky_rerun

    Since you are using nmake I'm going to assume you are using gcc while this won't give your resource files it will let you see your source dependencies. How are you using the resource files are they linked into the some type of executable shouldn't you be able to see what you linking in in your make file. this is from the gcc online manual -

    M
    Instead of outputting the result of preprocessing, output a rule suitable for make describing the dependencies of the main source file. The preprocessor outputs one make rule containing the object file name for that source file, a colon, and the names of all the included files, including those coming from -include or -imacros command line options.

    Unless specified explicitly (with -MT or -MQ), the object file name consists of the basename of the source file with any suffix replaced with object file suffix. If there are many included files then the rule is split into several lines using \\-newline. The rule has no commands.
    
    This option does not suppress the preprocessor's debug output, such as -dM. To avoid mixing such debug output with the dependency rules you should explicitly specify the dependency output file with -MF, or use an environment variable like DEPENDENCIES\_OUTPUT (see Environment Variables). Debug output will still be sent to the regular output stream as normal.
    

    Passing -M to the driver implies -E, and suppresses warnings with an implicit -w.


    a programmer traped in a thugs body

    Algorithms data-structures help tutorial discussion

  • Creating graph of file usage in build tree
    K ky_rerun

    wouldn't static code analyzation be a better choice by simply parsing all of the includes assuming its a c or c++ program. or another option to have you project just output the result of the preprocessor in visual studio it will tell you which files it included.


    a programmer traped in a thugs body

    Algorithms data-structures help tutorial discussion

  • Mysql Remote login
    K ky_rerun

    How are you trying to connect I assume you are using the mysql data provider for .net if so what is you connections string sans the username and password


    a programmer traped in a thugs body

    Managed C++/CLI help csharp c++ database mysql
  • Login

  • Don't have an account? Register

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