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
Y

Yogesh Kshatriya

@Yogesh Kshatriya
About
Posts
13
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • DataBase Search Engine Product
    Y Yogesh Kshatriya

    Can someone suggest some good products which will allow me to provide Google like search engine for a popular RDBMSs like SQL Server , Oracle without writing a lot of code.

    IT & Infrastructure database sql-server oracle sysadmin

  • .NET Framework - Restarting Framework
    Y Yogesh Kshatriya

    Stop all managed Apps & restart any one of them!

    .NET (Core and Framework) question csharp dotnet com

  • Assemblies
    Y Yogesh Kshatriya

    Check out this link. http://msdn.microsoft.com/netframework/gettingstarted/default.aspx?pull=/library/en-us/dndotnet/html/faq111700.asp#faq111700_assembly01[^]

    Visual Studio question

  • How can i manipulate Registry
    Y Yogesh Kshatriya

    Check the help documentation for API RegOpenKeyEx. You need to specify the access level you desire while opening a registry key. You haven't given that. (Check the help documentaion for 4 the para of the API RegOpenKeyEx) That will solve your problem;)

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

  • How can i manipulate Registry
    Y Yogesh Kshatriya

    Check the following sample function for creating & setting a registry key. You can use APIs RegOpenKeyEx, RegQueryMultipleValues, RegQueryValue defined in winreg.h to read the values from registry keys BOOL CFTPDlg::RegisterFTPProfile(FTPProfile LocalCopyFTPProfile) { BOOL bRetVal; HKEY hkResult; CString strTmp; unsigned char *lpBuf; int n; //Preapre the complete Path Name for selected profile. strTmp = g_strProfileRegPath + CString("\\"); strTmp += (LPCTSTR)LocalCopyFTPProfile.strProfileName ; bRetVal=RegCreateKeyEx(HKEY_LOCAL_MACHINE, (LPCTSTR)strTmp, NULL, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &hkResult, NULL); if (bRetVal==ERROR_SUCCESS) { n=LocalCopyFTPProfile.strHostAdd.GetLength()+1; lpBuf = (unsigned char *)calloc(n, sizeof(char)); strcpy((char *)lpBuf,(LPCTSTR)LocalCopyFTPProfile.strHostAdd); bRetVal=RegSetValueEx(hkResult, "HOST_ADD", NULL, REG_SZ, lpBuf, n); free((void *)lpBuf); n=LocalCopyFTPProfile.strLoginID.GetLength()+1; lpBuf = (unsigned char *)calloc(n, sizeof(char)); strcpy((char *)lpBuf,(LPCTSTR)LocalCopyFTPProfile.strLoginID); bRetVal=RegSetValueEx(hkResult, "LOGINID", NULL, REG_SZ, lpBuf, n); free(lpBuf); n=LocalCopyFTPProfile.strPassword.GetLength()+1; lpBuf = (unsigned char *)calloc(n, sizeof(char)); strcpy((char *)lpBuf, (LPCTSTR)LocalCopyFTPProfile.strPassword); bRetVal=RegSetValueEx(hkResult, "PASSWORD", NULL, REG_SZ, lpBuf, n); free(lpBuf); n=LocalCopyFTPProfile.strHostPath.GetLength()+1; lpBuf = (unsigned char *)calloc(n, sizeof(char)); strcpy((char *)lpBuf,(LPCTSTR)LocalCopyFTPProfile.strHostPath); bRetVal=RegSetValueEx(hkResult, "HOST_PATH", NULL, REG_SZ, lpBuf, n); free(lpBuf); n=LocalCopyFTPProfile.strLocalPath.GetLength()+1; lpBuf = (unsigned char *)calloc(n, sizeof(char)); strcpy((char *)lpBuf , (LPCTSTR)LocalCopyFTPProfile.strLocalPath); bRetVal=RegSetValueEx(hkResult, "LOCAL_PATH", NULL, REG_SZ, lpBuf, n); free(lpBuf); n=LocalCopyFTPProfile.strSleepTime.GetLength()+1; lpBuf = (unsigned char *)calloc(n, sizeof(char)); strcpy((char *)lpBuf , (LPCTSTR)LocalCopyFTPProfile.strSleepTime); bRetVal=RegSetValueEx(hkResult, "SLEEP_TIME"

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

  • displaying the mem address of chars + char arrays
    Y Yogesh Kshatriya

    a contains address of b. But if you say cout << a, it won't print the contents of a ( i.e address of b). But you know it is address i.e. unsigned long type, so force it to print conent of a as an address. Actually referencing & derefrerncing in the statment is not required. i.e (unsigned long)(*(&a)) is same as (unsigned long)(a)

    C / C++ / MFC

  • displaying the mem address of chars + char arrays
    Y Yogesh Kshatriya

    Modify the code as follows. It should serv your purpose. void main(){ char *a; char b = 'B'; a = &b; cout <<"address of a = " <<&a <

    C / C++ / MFC

  • How to Set a Directory path for PATH environment variable
    Y Yogesh Kshatriya

    Use function BOOL SetEnvironmentVariable( LPCTSTR lpName, LPCTSTR lpValue ); defined in winbase.h

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

  • Address of member functions
    Y Yogesh Kshatriya

    Also is there any way to find an address where the function ends?

    C / C++ / MFC c++ question

  • Address of member functions
    Y Yogesh Kshatriya

    As I understand, the function addresses obtained using this way are not the real addresses. They just provide an offset of a member function within an object. #include class A { public: int func() { return 1; } }; void main(){ A x; int (A::*ptr_to_method)() = A::func; getch(); } If for the above program you check inside Watch window of VC++ 6.0, the values of following variables ptr_to_method (&x)->func It shows different addresses. Now which one is the correct address of function "func"? Also I was not able to capture the value of "(&x)->func" inside program.

    C / C++ / MFC c++ question

  • Address of member functions
    Y Yogesh Kshatriya

    Hi, Is it possible to obtain beginning & ending addresses of public member functions of C++ object, outside the object? If yes How? Thanks Yogesh

    C / C++ / MFC c++ question

  • pointer to vtable
    Y Yogesh Kshatriya

    As far as I know it is not possible.

    C / C++ / MFC c++ question

  • How to list all the Folder that Shared fully in a Drive
    Y Yogesh Kshatriya

    If you don't want to write any program for the same , try following. If you are talking about C or D drive, go to root of the drive & fire following command. "dir /S /ON /AD /B > AllFolder.txt" All the folder will be listed in AllFolder.txt

    C / C++ / MFC help tutorial 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