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

Rahul Vaishnav

@Rahul Vaishnav
About
Posts
72
Topics
29
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Internet Filtering Applications
    R Rahul Vaishnav

    Hi, I want to use LSP for inter filtering. I want to modify buffer WSPRecv from non-ifslsp in order to insert forbidden error. Please someone help me how can I modify this buffer and fill forbidden error message in this buffer. So that, that forbidden response can be seen on browser.

    C / C++ / MFC c++ com sysadmin json

  • Proxy authentication failed error code is 407. Same code works fine without proxy.
    R Rahul Vaishnav

    Below links might help you.. http://www.informit.com/library/content.aspx?b=Visual_C_PlusPlus&seqNum=107[^] http://graphcomp.com/info/specs/ms/inetr002.htm[^]

    C / C++ / MFC help com sysadmin security

  • Proxy authentication failed error code is 407. Same code works fine without proxy.
    R Rahul Vaishnav

    try below code to set proxy settings,may be it will help you...

     CInternetSession ises;
     INTERNET\_PROXY\_INFO proxyinfo;
     proxyinfo.dwAccessType = INTERNET\_OPEN\_TYPE\_PROXY;
     proxyinfo.lpszProxy = "192.168.9.10:8080";
     proxyinfo.lpszProxyBypass = NULL;
     ises.SetOption(INTERNET\_OPTION\_PROXY,(LPVOID)&proxyinfo,sizeof(INTERNET\_PROXY\_INFO));
    
    C / C++ / MFC help com sysadmin security

  • problem using ShellExecute to open folder
    R Rahul Vaishnav

    Thanks for you reply...

    C / C++ / MFC help

  • problem using ShellExecute to open folder
    R Rahul Vaishnav

    Hi all, I have faced an amazing problem. Please go through below steps to reproduce: 1. create two folders ex. new1 & new2 on D drive. 2. create one short cut of folder new1 like "Shortcut to new1" on D drive only. 3. Rename "Shortcut to new1" to "new2" 4. Execute below code

    ShellExecute(GetSafeHwnd(), NULL, L"D:\\new2", L"", NULL,
    SW_SHOWNORMAL);

    Actual Results : It opens folder new1 from D drive. Expected results : It should open folder new2 D drive.

    C / C++ / MFC help

  • Desktop Context menu "Paste Shortcut" issue, Please help
    R Rahul Vaishnav

    Hi Richard, Thanks for reply... now I have tried below code... Below code is not showing crash as I have used "link" as lpVerb. as you said I have provided all Content of CMINVOKECOMMANDINFO structure. "InvokeCommand" is return S_OK But still Paste Shortcut is not happening on Desktop. :-(

    void PasteShortcut()
    {
    try
    {
    CoInitialize(NULL);

    	IShellFolder\* psf;
    	HWND hWnd = GetDesktopWindow();
    	HRESULT hr;
    	if (SUCCEEDED(SHGetDesktopFolder(&psf)))
    	{
    		IContextMenu\* pcm;
    		if (SUCCEEDED(psf->CreateViewObject(hWnd,IID\_IContextMenu,(void\*\*)&pcm)))
    		{
    			HMENU hmenu = CreatePopupMenu();
    			if (hmenu != NULL) {
    				if (SUCCEEDED(pcm->QueryContextMenu(hmenu, 0,
    					0 , 0xff,	// since we're invoking by canonical name the menu ID range passed to QueryContextMenu can be arbitrary
    					CMF\_NORMAL))) {
    						CMINVOKECOMMANDINFO  cmi;
    					cmi.cbSize = sizeof(CMINVOKECOMMANDINFO);
    					cmi.fMask = 0;
    					cmi.hwnd = hWnd;
    					cmi.lpVerb ="link" ;//(LPCSTR)(INT\_PTR)(idCmd - 1);
    					cmi.lpParameters = NULL;
    					cmi.lpDirectory = NULL;
    					cmi.nShow = SW\_NORMAL;
    					cmi.dwHotKey = 0;
    					cmi.hIcon = NULL;
    					hr = pcm->InvokeCommand(&cmi);
    						
    						if (SUCCEEDED(hr)) {
    							MessageBox(hWnd, TEXT("Shortcut created"), TEXT("Message"), 0);
    						}
    				}
    				DestroyMenu(hmenu);
    			}
    			pcm->Release();
    		}
    		psf->Release();
    	}
    	CoUninitialize();
    
    }
    catch(...)
    {
    }
    

    }

    C / C++ / MFC help announcement

  • Desktop Context menu "Paste Shortcut" issue, Please help
    R Rahul Vaishnav

    Hi all, Please go through below function. Copy any file/folder & then use this function to past Shortcut It is crashing "InvokeCommand". Please help me.

    void PasteShortcut()
    {
    try
    {
    CoInitialize(NULL);
    IShellFolder* psf;
    HWND hWnd = GetDesktopWindow();
    HRESULT hr;
    if (SUCCEEDED(SHGetDesktopFolder(&psf)))
    {
    IContextMenu* pcm;
    if (SUCCEEDED(psf->CreateViewObject(hWnd,IID_IContextMenu,(void**)&pcm)))
    {
    HMENU hmenu = CreatePopupMenu();
    if (hmenu != NULL) {
    if (SUCCEEDED(pcm->QueryContextMenu(hmenu, 0,
    0, 0xff, // since we're invoking by canonical name the menu ID range passed to QueryContextMenu can be arbitrary
    CMF_NORMAL))) {
    CMINVOKECOMMANDINFO cmi={0};
    cmi.hwnd=hWnd;
    cmi.cbSize=sizeof(cmi);
    cmi.lpVerb= ".lnk";
    hr= pcm->InvokeCommand(&cmi);
    if (SUCCEEDED(hr)) {
    MessageBox(hWnd, TEXT("Shortcut created"), TEXT("Message"), 0);
    }
    }
    DestroyMenu(hmenu);
    }
    pcm->Release();
    }
    psf->Release();
    }
    CoUninitialize();

    }
    catch(...)
    {
    }
    

    }

    C / C++ / MFC help announcement

  • Urgent help required to Do something in standby mode for windows Mobile.
    R Rahul Vaishnav

    Hi all, Please help me in below scinario. I have one win32 exe made for Windows mobile in VC++,which is running in background.I want to write some code which should execute at 12:01 Am daily. I have used timer but it is not running in standby(Sleep) Mode of device. I have also found something CeRunAppAtTime but on some link it is written that this won't work in sleep mode of device & also it is not supported by all devices. Please let me know what i have to do? How can i resolve this problem. Thanks in advance.

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

  • How to use Timer in win32 dll?
    R Rahul Vaishnav

    Hi all, I have developed one win32 dll in VC++ for windows mobile. I need to do some work after each 1 hour, So I want to use Timer in this dll. Can any one please let me know that how can i use Timer in dll? Regards, Rahul Vaishnav

    C / C++ / MFC question c++ tutorial

  • Error: CAB file "..\Debug\SetupMapiRule.CAB" could not be created
    R Rahul Vaishnav

    Hi , Thank you for your reply. I actually I have solved that problem. Actually the problem was that the Primary output file(the mapirule.dll) which I am adding in file system of my cab file was kept at (C:\Program Files\Windows Mobile 6 SDK\Samples\Common\CPP\Win32\MapiRule\Windows Mobile 6 Professional SDK (ARMV4I)\Debug) whic is too much long path & having spaces also. So I just kept my mapirule.dll at shortest path (d:\mapirule.dll) :) and added this dll to my setup workspace.. and now I have compiled my workspace,cab file got created. I hope this will help you also. This worked for me. Thank you

    Mobile help c++ windows-admin debugging

  • Error: CAB file "..\Debug\SetupMapiRule.CAB" could not be created
    R Rahul Vaishnav

    Hello all, I am new to windows CE programming. I have compiled MAPIRULE sample which is provided in Windows mobile 6 SDK at path "C:\Program Files\Windows Mobile 6 SDK\Samples\Common\CPP\Win32\MapiRule". dll code get compiled properly but after compilation of SetupMapiRule project i am getting error. Below is the content of cabwiz.log Warning: Section [RegKeys] registry value "" has an empty string for the data. Warning: Section [RegKeys] registry value "" has an empty string for the data. Warning: Section [Shortcuts] has no data Error: CAB file "D:\Win CE\MapiRule\SetupMapiRule\Debug\SetupMapiRule.CAB" could not be created Please help me. beacuse without cab file i can not install any project in device. Thanks & Regards, Rahul Vaishnav

    Mobile help c++ windows-admin debugging

  • Multiple Inheritance problem
    R Rahul Vaishnav

    Thank you...

    C / C++ / MFC help oop question

  • Multiple Inheritance problem
    R Rahul Vaishnav

    Symfund wrote:

    What's the difference between upcasting and downcasting?

    I am sorry but,I didn't get how this question answers my question?

    C / C++ / MFC help oop question

  • Multiple Inheritance problem
    R Rahul Vaishnav

    Hi all, I have one problem in using Multiple Inheritance, please go through below Code

    class Base1
    {
    public:
    void Show()
    {
    cout<<"Base1";
    }

    };
    class Base2
    {
    public:
    void Show()
    {
    cout<<"Base2";
    }
    };
    class Derived: public Base1,public Base2
    {
    }
    main()
    {
    Derived d;
    d.Show();
    }

    Error: error C2385: ambiguous access of 'show' Please provide some solution for the above code. Can virtual Base class concept work in this,if yes then how?

    C / C++ / MFC help oop question

  • Ruuning MFC Exe without Oracle Client
    R Rahul Vaishnav

    [Message Deleted]

    C / C++ / MFC c++ database oracle announcement

  • Error "the procedure entry point Getaddrinfo could not be located in the dynamic link library WS2_32.dll"
    R Rahul Vaishnav

    Thankyou friend it is working properly...

    C / C++ / MFC help tutorial

  • Error "the procedure entry point Getaddrinfo could not be located in the dynamic link library WS2_32.dll"
    R Rahul Vaishnav

    Hi Randor, thanks for reply.. I have done code like below but still i have same problem. :( Please let me know am i coding in the right direction, because this thing is new for me..

    WSADATA wsaData;
    int iResult;
    DWORD dwRetval;
    int i = 1;
    char *port = "80"; // I am using http protocol
    struct addrinfo *result = NULL;
    struct addrinfo *ptr = NULL;
    struct addrinfo hints;
    // Initialize Winsock
    iResult = WSAStartup(MAKEWORD(2, 2), &wsaData);
    if (iResult != 0) {
    printf("WSAStartup failed: %d\n", iResult);
    return 1;
    }

    //--------------------------------
    // Setup the hints address info structure
    // which is passed to the getaddrinfo() function
    ZeroMemory( &amp;hints, sizeof(hints) );
    hints.ai\_family = AF\_UNSPEC;
    hints.ai\_socktype = SOCK\_STREAM;
    hints.ai\_protocol = IPPROTO\_TCP;
    

    //--------------------------------"
    // Call getaddrinfo(). If the call succeeds,
    // the result variable will hold a linked list
    // of addrinfo structures containing response
    // information

    dwRetval = getaddrinfo("xx.x.xxx.xxx", "80", &hints, &result);
    if ( dwRetval != 0 ) {
        printf("getaddrinfo failed with error: %d\\n", dwRetval);
        WSACleanup();
        return 1;
    }
    

    line 1: CoInitialize(NULL);
    line 2: xyzService::CxyzService test;
    line 3: CComBSTR result1;
    line 4: test.Methodname(CComBSTR(L"0001"),CComBSTR (L"0001"),&result1);
    line 5: CoUninitialize();

    freeaddrinfo(result);
    WSACleanup();

    C / C++ / MFC help tutorial

  • Error "the procedure entry point Getaddrinfo could not be located in the dynamic link library WS2_32.dll"
    R Rahul Vaishnav

    hi Randor, thanks for your reply. Actually I am using a service which is made in DotNet(C#) by DotNet Team :). Is it possible to overcome this problem through our client Application(My MFC application)? Regards, Rahul Vaishnav

    C / C++ / MFC help tutorial

  • Error "the procedure entry point Getaddrinfo could not be located in the dynamic link library WS2_32.dll"
    R Rahul Vaishnav

    Hi all, I am calling some methods from the Web service which i have added to my solution. For Example please refer below code. below code is perfectly running fine on XP,Vista but i have tested it on Windows 2000 prof.

    line 1: CoInitialize(NULL);
    line 2: xyzService::CxyzService test;
    line 3: CComBSTR result;
    line 4: test.Methodname(CComBSTR(L"0001"),CComBSTR (L"0001"),&result);
    line 5: CoUninitialize();

    if i run this code in Win 2000 it gives below error, "the procedure entry point Getaddrinfo could not be located in the dynamic link library WS2_32.dll" if i comment line no. 4 from above code,it runs properly. This error is arriving due to call of any method in webservice. Please help me to find some solution. Thanks in advance

    C / C++ / MFC help tutorial

  • Problem while using CComBSTR
    R Rahul Vaishnav

    Is there any solution for the above problem.. Please help me.

    C / C++ / MFC help
  • Login

  • Don't have an account? Register

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