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
T

tasumisra

@tasumisra
About
Posts
271
Topics
121
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Directory manipulation in C++
    T tasumisra

    Dear Friends, I am working on a legacy project where i do not have support for boost libraries or latest C++ version. I need to identify the path of a file with given extension(*.abc) that is inside couple of folder. as example i have path like C:\test but the given file is found in c:\test\Application\SomeohterApplication\hello.abc can someone help please ? Thanks in advance.

    vikas da

    ATL / WTL / STL c++ help tutorial question announcement

  • How to use .Def File
    T tasumisra

    i am thinking to give some details ,:) my CPP file looks like this ... headers #ifdef _USRDLL #pragma comment(linker, "/EXPORT:GenerateFiles=?GenerateFile@@YGJPAUHWND__@@PAUHINSTANCE__@@PADH@Z") #endif __declspec(dllexport) HRESULT __stdcall GenerateFiles(HWND hwnd,HINSTANCE hinst,LPSTR lpCmdLine,int nCmdShow) { /// some code to generate CPP files exposing by the DLL } now can i invoke GenerateFiles method during build process some way ?

    vikas da

    ATL / WTL / STL c++ help tutorial

  • linking issue
    T tasumisra

    Hello All, I have C++ dll, that has some exposed functionality using Def files, among all those CPP files there is one Cpp (Lets call it "Generator.cpp") files that dosnt gets compile normally but it is used to generate supporting C++ file that is exposed in Def files.(some how...some developer thought process, Legacy code) the Generator.cpp looks like this

    #ifdef _USRDLL
    #pragma comment(linker, "/EXPORT:GenerateFiles=?GenerateFile@@YGJPAUHWND__@@PAUHINSTANCE__@@PADH@Z")
    #endif

    __declspec(dllexport) HRESULT __stdcall GenerateFiles(HWND hwnd,HINSTANCE hinst,LPSTR lpCmdLine,int nCmdShow)
    {
    /// some code to generate CPP files exposing by the DLL
    }

    can some body help what commandline parameter i should pass so that possible EXPORT can happen and CPP file would be generated.

    vikas da

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

  • How to use .Def File
    T tasumisra

    Thank you Richard , the person has quit...:) i guess i would need some more time to understand this code.

    vikas da

    ATL / WTL / STL c++ help tutorial

  • How to use .Def File
    T tasumisra

    Thank you so much

    Richard MacCutchan
    

    for reply. so project looks like this, project structure looks like this. it has a def file that has function to be exported, it has a generator.cpp that generates x.cpp file it has x.cpp file that expose some function that is used in other projects now first i have to use .def file to invoke methods in Generator.cpp to generate the x.cpp file and then compile the project so that the generated dll can be used by other application. what i am not aware of ...how to invoke Generator.cpp ...is there any parameter that i can tweak during compilation time so that it generate the CPP files first and then compile the DLL or any other possible way Thank you so much in advance

    vikas da

    ATL / WTL / STL c++ help tutorial

  • How to use .Def File
    T tasumisra

    Hello All, I am working on a legacy application , i am seeing it has some .Def file that is using to generate some cpp file and its used inside the same project. Can somebody help me in understanding how to invoke .Def file.

    vikas da

    ATL / WTL / STL c++ help tutorial

  • Dirtying my hand with regular expression for first time
    T tasumisra

    Thanks Richard Deeming and OriginalGriff ...I will test the various scenario and update you the same. Thank you so much for the help

    vikas da

    C# regex help

  • Dirtying my hand with regular expression for first time
    T tasumisra

    Perhaps i could have provided this before..

    Quote:

    "FIRSTNAME Tasu LASTNAME Mishra DOB 02011982 PIN 12345 ADDLINE1....." "FIRSTNAME Tasu LASTNAME Mishra DOB 02011982 PIN # 12345 CITY....." "FIRSTNAME Tasu LASTNAME Mishra DOB 02011982 PIN: 123 5 COUNTRY....." "FIRSTNAME Tasu LASTNAME Mishra DOB 02011982 PIN NUMBER ADDLINE1....."

    So in Above the value of PIN value needs to be masked with (*)...if it has some value.. Pin can be alphanumeric and can have space also. above streams are from different screen so they do not have consistency in name of PIN as it can be PIN: or PIN # or PIN NUMBER or simply PIN... The ADDLINE1 is also not fixed and it can change to CITY,Country etc Now i have to extract the value of PIN|PIN:|PIN #|PIN NUMBER and need to replace it by ***** in all the scenario if it contains a value. Let me know if you still have some doubts..

    vikas da

    C# regex help

  • Dirtying my hand with regular expression for first time
    T tasumisra

    Hello Experts, This is my first attempt to use regular expression for a sequence of string.. i am partially successful but wants to get things validated... I have a sequence of character like "ABC 34 DEX 456 NT 456 TEXT rt st NEWTEXT 4564" All caps are identifier and subsequent is the value like the value of ABC is 34 and DEX is 456.... Problem: i need to replace the value of TEXT with * 1)it can be null 2)its name itself can change like TEXTVAL or TEXT: 3)there could be 2 or 3 space after TEXT 4)But the max length of value would be 5 and min would be 2 5)it can accept space too at any position in the value Considering all above i reached in the conclusion that it would be hard to find number of element for Value..as space can be from value or from field... what i have decided i will insert five stars(*****) max length of TEXT value... so to achieve this i am using

    Quote:

    Regex _regex = new Regex(@"/TEXT/([a-z0-9\-\ ]+)\ $");

    for each field TEXT,TEXT: and TEXTVAL.. but i am not very much convinced with the approach ..can some body help me here.. Thanks, Tasu

    vikas da

    C# regex help

  • Windows Service: Timer vs Thread
    T tasumisra

    Quote:

    I have a service that has multiple process running at the same time (6-10)

    is it multiple thread or process..??and what are you trying to achieve with timer or thread..? can you please be bit more specific..

    vikas da

    C# discussion visual-studio performance question

  • viewing and printing a pdf on different browser
    T tasumisra

    Hi Guys, Recently i am working on an assignment where i need to find a 3rd party software to download and print a pdf on different browser including (IE6,7,8,9) and Mozila,crome ,Opera etc.. i found a few but not sure which one would be suitable http://www.debenu.com/kb/setup-c-and-visual-studio-for-use-with-debenu-quick-pdf-library/[^] http://www.verypdf.com/app/pdf-editor/pdf-viewer-ocx-control-activex.html[^] http://www.foxitsoftware.com/products/sdk/print-manager/pricing.php[^] can you please help me in selecting one .. may be the one can be used with windows based application as well. Regards, Tasu

    vikas da

    C# com php html sales help

  • Question regarding MFC
    T tasumisra

    Thank you so much AnsHUMAN and Chandra.. I guess i need to work hard for MFC...

    vikas da

    C / C++ / MFC question c++ asp-net com help

  • Question regarding MFC
    T tasumisra

    Hi Guys! Nowadays i am appearing for interviews with expertise in COM+/DCOM/Web-services. I have done little work in MFC may be close to 8 months for a maintenance project. During interviews interviewers are more focused in MFC rather than my core expertise,now i am planning to learn MFC as well... I have been asked about many macros in the interviews.. I have following question: 1)Do i need learn about all or most of the important classes..? 2)Do i need to know all the Macros..? 3)how about win32..? what else i should learn in this... what you guys would advise me in this ??? i bought a MFC book "MFC Programming from the ground up" Please help and Thanks in advance.

    vikas da

    C / C++ / MFC question c++ asp-net com help

  • listing Office contacts
    T tasumisra

    Thank you so much Rich.. yes there is a need of going through the documentation.

    vikas da

    ATL / WTL / STL help tutorial

  • listing Office contacts
    T tasumisra

    i tried that as above...

    hr=pCon->Item(0,&ppContacts);

    now ppContacts seems to be another interface with all COM predefined methods like Querry interface ,addref release etc.

    vikas da

    ATL / WTL / STL help tutorial

  • listing Office contacts
    T tasumisra

    Thanks Rich.. added

    IDispatch *ppContacts;
    hr=pCon->Item(0,&ppContacts);

    after that not getting any clue how to proceed further...any help ..i am just blank...

    vikas da

    ATL / WTL / STL help tutorial

  • listing Office contacts
    T tasumisra

    Thanks for the reply... Please find the complete code

    Quote:

    #include
    #include
    #include
    #include
    #include

    #include "c:\program files\Microsoft Office Communicator\SDK\msgrua.h"

    const GUID IID_IMessenger =
    {0xD50C3186,0x0F89,0x48f8,{0xB2,0x04,0x36,0x04,0x62,0x9D,0xEE,0x10}};

    const GUID CLSID_Messenger =
    {0x8885370D,0xB33E,0x44b7,{0x87,0x5D,0x28,0xE4,0x03,0xCF,0x92,0x70}};

    const GUID IID_MessengerContacts =
    {0xE7479A0F,0xBB19,0x44a5,{0x96,0x8F,0x6F,0x41,0xD9,0x3E,0xE0,0xBC}};

    const GUID IID_IEnumVARIANT =
    {0x00020404,0x0000,0x0000,{0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46}};

    IMessenger* m_pIMessenger;

    IMessengerContact* GetContact(BSTR bstrSigninName);

    using namespace std;

    int _tmain(int argc, _TCHAR* argv[])
    {
    CoInitialize(NULL);
    HRESULT hr = CoCreateInstance(CLSID_Messenger,NULL,CLSCTX_LOCAL_SERVER,
    IID_IMessenger, (LPVOID *)&m_pIMessenger);

    BSTR myName;
    MISTATUS sMyStatus;

    //hr = m_pIMessenger->get_MyFriendlyName(&myName);
    hr=m_pIMessenger->get_MySigninName(&myName);
    hr = m_pIMessenger->get_MyStatus(&sMyStatus);

    BSTR serviceId;
    m_pIMessenger->get_MyServiceId(&serviceId);

    IDispatch *pContacts;
    IMessengerContacts *pCon;

    if (FAILED(hr))
    return NULL;

    hr = m_pIMessenger->GetContact(myName, serviceId,
    (IDispatch**)&pCon);
    if(FAILED(hr))
    {
    cout<<"Failed";
    }

    m_pIMessenger->get_MyContacts(&pContacts);
    pContacts->QueryInterface(__uuidof(IMessengerContacts),(void**)&pCon);

    long lCount=0;
    pCon->get_Count(&lCount);

    CoUninitialize();

    return 0;
    }

    Bow here i can see the count..now i want to iterate through each contact ..i am not getting right method to do the same.

    vikas da

    ATL / WTL / STL help tutorial

  • listing Office contacts
    T tasumisra

    Hi Guys, i want to list and check the status of each contact of my Office Communicator for this i have done till 1)i can see number of contact from get_count method 2)GetContact method is also successfully executed. and done know how to move further.. any help is appriciated..

    CoInitialize(NULL);
    HRESULT hr = CoCreateInstance(CLSID_Messenger,NULL,CLSCTX_LOCAL_SERVER,
    IID_IMessenger, (LPVOID *)&m_pIMessenger);

    BSTR myName;
    MISTATUS sMyStatus;
    
    //hr = m\_pIMessenger->get\_MyFriendlyName(&myName);
    hr=m\_pIMessenger->get\_MySigninName(&myName);
    hr = m\_pIMessenger->get\_MyStatus(&sMyStatus);
    
    BSTR serviceId;
    m\_pIMessenger->get\_MyServiceId(&serviceId);
    
    IDispatch \*pContacts;
    IMessengerContacts \*pCon;
      BSTR bstrServiceId;
    
          hr = m\_pIMessenger->get\_MyServiceId(&bstrServiceId);
    	
      if (FAILED(hr))
    	 return NULL;
    
    
    
      hr = m\_pIMessenger->GetContact(myName, bstrServiceId, 
                                     (IDispatch\*\*)&pCon);
    

    vikas da

    ATL / WTL / STL help tutorial

  • trying to find the status of contacts from Office Communicator
    T tasumisra

    Hi Guys, I am trying to find status of may contacts but not able to find appropriate function here is the sample for that

    #include #include #include "c:\program files\Microsoft Office Communicator\SDK\msgrua.h"

    const GUID IID_IMessenger =
    {0xD50C3186,0x0F89,0x48f8,{0xB2,0x04,0x36,0x04,0x62,0x9D,0xEE,0x10}};

    const GUID CLSID_Messenger =
    {0x8885370D,0xB33E,0x44b7,{0x87,0x5D,0x28,0xE4,0x03,0xCF,0x92,0x70}};

    const GUID IID_MessengerContacts =
    {0xE7479A0F,0xBB19,0x44a5,{0x96,0x8F,0x6F,0x41,0xD9,0x3E,0xE0,0xBC}};

    IMessenger* m_pIMessenger;
    int _tmain(int argc, _TCHAR* argv[])
    {
    CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
    HRESULT hr = CoCreateInstance(CLSID_Messenger,NULL,CLSCTX_LOCAL_SERVER,
    IID_IMessenger, (LPVOID *)&m_pIMessenger);

    BSTR myName;
    MISTATUS sMyStatus;
    
    hr = m\_pIMessenger->get\_MyFriendlyName(&myName);
    hr = m\_pIMessenger->get\_MyStatus(&sMyStatus);
    
    BSTR serviceId;
    m\_pIMessenger->get\_MyServiceId(&serviceId);
    
    IDispatch \*pContacts;
    IMessengerContacts \*pCon;
    
    m\_pIMessenger->get\_MyContacts(&pContacts);
    pContacts->QueryInterface(\_\_uuidof(IMessengerContacts),(void\*\*)&pCon);
    
    IDispatch \*pDispatch;
    
    hr=pCon->Item(1,&pDispatch);
    long lCount=0;
    pCon->get\_Count(&lCount);
    
        //here lCount is total number of contacts 
        //now i am not getting appropriate method to iterate through
    CoUninitialize();
    
    return 0;
    

    }

    Please help me in finding appropriate function to get information about each contact.

    vikas da

    C / C++ / MFC help

  • Connecting database from different domain
    T tasumisra

    Hi Guys! I am trying to make one simple application where i want to have info from db(Damain Z) example: I am in Damain X where the tool will reside,i have a bridge domain Y and a domain Z where DB resides.. any clue how to solve this senario!!!

    vikas da

    C# database tutorial
  • Login

  • Don't have an account? Register

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