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
R

Rajesh_Parameswaran

@Rajesh_Parameswaran
About
Posts
37
Topics
22
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • How to create a Data Segment in a DLL that can only be accessed by a valid trusted application
    R Rajesh_Parameswaran

    Hi there, I have an application which requires to read the credentials and login to the DB. Since my application runs on schedule, someone has to fed in the credentials. Storing the credentials in flat file with any encryption (including DPAPI) is not helping as the entropy will be stored in the same file and it can be easily retrieved. Thought of having the Salt for the entropy in-memory which will be key-ed in by the user through an application that will be written on a secured shared memory and the same will only be able to access by my own process (with validating the Digital signature thump print). The provision of creating the shared segment is done by a DLL and the Client process which sets the password and my process which reads the password is digitally signed and I can validate the same in the DLLMain - PROCESS_ATTACH. If the digital signature is invalid, I'm unloading the DLL by terminating the same. All worked well with LoadLibrary API and when we tried testing with LoadLibraryEx with the option: DONT_RESOLVE_DLL_REFERENCES, it was not hitting the DLLMain and was able to call all the exported functions. My query is that is there a way to securely share a data between two trusted application alone? The application is developed using C++. thanks in advance, Rajesh Iyer

    C / C++ / MFC database c++ security cryptography testing

  • Getting ProcessID from CoCreateInstance
    R Rajesh_Parameswaran

    Hi there, I'm using VC++ 7.0 wherein I'm trying to launch an exe using CoCreateInstance. I've the executable path, but don't want to run thru the entire process list to find out the process id. So is there a way to get the process ID directly from an CoCreateInstance for an executable of type CLSCTX_LOCAL_SERVER? thanks in advance. regards, Rajesh

    C / C++ / MFC c++ question

  • Getting the User Name for a Process
    R Rajesh_Parameswaran

    Thanks Mark. It worked after initializing those two variables. regards, Rajesh

    C / C++ / MFC csharp c++ visual-studio com help

  • Getting the User Name for a Process
    R Rajesh_Parameswaran

    Hi there, I'm working on a Application developed using Visual Studio 2008 (VC++). I'm looking for a way to get the name of the current user session using the process ID. My intention here is to check for a particular process (AA.exe) and see this is not running for a current user. I'm using the CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, NULL) to get the list of process, and traverse thru the list for a matching AA.exe process. But this returns the list of processes from all users. I've gone thru the example: List Processes Which Are Created By Specific Users[^] But the function LookupAccountSid() returns 0 and the get last error also returns 0. The value of the username field seems to be NULL. Kindly let me know, if there are any other ways to get the name of the current user session using the Process ID. Thanks in advance. regards, Rajesh

    C / C++ / MFC csharp c++ visual-studio com help

  • MAPISendMail fails with error 2 on Microsoft Outlook 2003 with Win XP
    R Rajesh_Parameswaran

    Hi there, I've an application which uses MAPI for sending mails. It was all working well with Outlook 2007 on Win XP. But when I work on Outlook 2003, with the same application, it is throwing an error - 2 (MAPI_E_FAILURE)when making a call to MAPISendMail() API. I used the sample application to test whether there is any issue with Outlook 2003, from the following link: Programmatically adding attachments to emails[^] but it seems to be working well. Only when I try to send mail from my old app, it always returns with the error 2. I've googled and tried almost all possible steps, but the issue still exist. ULONG nError = m_lpfnMAPISendMail(0, 0, &mapiMessage, MAPI_LOGON_UI|MAPI_DIALOG , 0); please advise on the resolution. Thanks in advance. regards, Rajesh

    C / C++ / MFC help com json question

  • How to get the real time weather info
    R Rajesh_Parameswaran

    Hi Stuart / David, I got some information from google. "http://www.google.co.in/ig/api?weather=trivandrum,india" we can specify the city name and the country name in the weather and it will display the contents in XML format. I would like to know, how through programically using VC+ to write the XML contents to a file or even read the contents of the XML so as to extract the weather information. Kindly pass on your comments. Please let me know, if you have a better way to achieve the same. Thanks in Advance, Rajesh

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

  • How to get the real time weather info
    R Rajesh_Parameswaran

    Hi David, I've seen a gadget called 'Weather 1.0.0' which comes with Windows Vista - Side Bar. I hope the same can be done using VC++. But I've no clues on how to start with. This needs an internet connection to be active to update the weather information. If someone can provide some pointers on this, will help me in proceeding further to achieve the same. Thanks in Advance, Rajesh

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

  • How to get the real time weather info
    R Rajesh_Parameswaran

    Hi there, I'm looking to get the real time weather of a particular city, when the pincode for the same has been provided. Is there any way in VC++ 6.0 or any Internet API which I can use to get the same? Kindly share your comments on this. Thanks in Advance, Rajesh

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

  • Executing external DOS command with output redirecting to file
    R Rajesh_Parameswaran

    Hi David, This log file is plain text file, a Sybase generated one for replication server and the logging will be very frequent and dynamic. Sample content of the file listed below: ================================================================================== I. 2006/03/15 06:50:48. The first transaction for database 'JAGUAR1.blue' has been logged into the exceptions log and skipped. I. 2006/03/15 06:50:49. A grouped transaction of 2 individual transactions has failed in database 'JAGUAR1.blue'. Each transaction in the group will be executed individually. E. 2006/03/15 06:50:51. ERROR #1028 DSI EXEC(104(1) JAGUAR1.blue) - dsiqmint.c(3062)      Message from server: Message: 2601, State 1, Severity 14 -- 'Attempt to insert duplicate key row in object 'NIiAppStat' with unique index 'XPKNIiAppStat' '. I. 2006/03/15 06:50:51. Message from server: Message: 3621, State 0, Severity 10 -- 'Command has been aborted. '. H. 2006/03/15 06:50:51. THREAD FATAL ERROR #5049 DSI EXEC(104(1) JAGUAR1.blue) - dsiqmint.c(3069)      The DSI thread for database 'JAGUAR1.blue' is being shutdown. DSI received data server error #2601 which is mapped to STOP_REPLICATION. See logged data server errors for more information. The data server error was caused by output command #1 mapped from input command #2 of the failed transaction. I. 2006/03/15 06:50:51. The DSI thread for database 'JAGUAR1.blue' is shutdown. ============================================================================== I'm looking for time stamp for   "ERROR #1028 DSI EXEC(104(1)" Thanks in Advance, Rajesh

    C / C++ / MFC c++ sysadmin help

  • Executing external DOS command with output redirecting to file
    R Rajesh_Parameswaran

    Hi Stuart, Thanks for your response. Is there a way to do backward read in a file? I searched in google and i couldn't find useful article on backward reading a file. Each line in the log file is dynamic. So reading a fixed length of character will end up in middle of a line. The time stamp in the log file is at be beginning of each line and there are changes that it might read half the line, if we try to read as a fixed chunk of data from bottom. please pass on your comments. Thanks in Advance, Rajesh

    C / C++ / MFC c++ sysadmin help

  • Executing external DOS command with output redirecting to file
    R Rajesh_Parameswaran

    Hi there, I'm trying to find a string inside a text file, using VC++ 6.0 application. The logs contained in the text file can grow up to MBs (50 - 70 MB) My aim here is to search a string in that and need to get the time stamp of last occurrence of the string. I cant use the sequential search as this process runs as a thread and it runs for every 2 seconds. Sequential search will take too much of time, if the size of the log file grows to MBs. I thought of using the findstr.exe command to find out the occurrence of the string "Error #1028" by this, all the lines matching the string will be redirected to the file, thus makes easy to find the last occurrence of the matching string. WinExec("findstr   /C:\"ERROR #1028\" C:\\SERVER.log > C:\\temp_log.txt", SW_HIDE) But, the output seems to be not re-directing to the temp_log.txt file. I even tried creating the file temp.txt before executing the same, but the contents will be blank. Even I tried the >> operator too. If i place this same command in a batch file, and invoke the batch file using WinExec(), it works fine. Please pass on your comments on how this could be achieve or is there any other way to achieve the same, without having a dependency on external DOS command findstr.exe Thanks in Advance, Rajesh

    C / C++ / MFC c++ sysadmin help

  • Grid control with Check boxes....Please Help
    R Rajesh_Parameswaran

    Hi There, Thanks for your response. One more question: I'm using a ListCtrl with the LVS_EX_CHECKBOXES option. Now I get the checkbox in the first column of the list control. Is it possible to move the check box to any other column in the list control? thanks in advance. regards, Rajesh

    C / C++ / MFC question css help

  • Grid control with Check boxes....Please Help
    R Rajesh_Parameswaran

    Hi there, I working in VC 6.0, in which I need to polulate the datas in a grid. One of the field may contain values either text or a check box. So how can I implement a column which have only text in some rows and the some rows having check boxes. Which control should I use, a Data Grid or a List Control? thanks in advance. regards, Rajesh

    C / C++ / MFC question css help

  • unbuffered() in .Net
    R Rajesh_Parameswaran

    Hi All, I am using the function unbuffered(int) in my project in VC 6.0 but when i compiled in .Net it is showing error saying that it is an undeclared identifier. This was inlcuded in the header Streamb.h in VC6. But I couldn't find the header in VC++.Net. May I know whether this function has been taken out in .Net or is there any equallent function for the same? thanks and regards, Rajesh

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

  • TCHAR porting issues while porting from VC6 to VC8
    R Rajesh_Parameswaran

    Yes Rajkumar, I have linked to the import library. thanks in advance, regards, Rajesh

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

  • TCHAR porting issues while porting from VC6 to VC8
    R Rajesh_Parameswaran

    Hi Pallini and Iain, Thanks for your response. But I still have that error. Both the Characterset are set to the following: Character Set: Use Unicode Character Set Treat wchar_t as Built-in Type: No(/Zc:wchar_t-)\ thanks and regards, Rajesh

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

  • TCHAR porting issues while porting from VC6 to VC8
    R Rajesh_Parameswaran

    Hi all, I'm using Visual Studio 2005. I have a workspace in visual C++ 6.0 which provides a set of library functions[DLL]. I have a client application which uses one of the function in the library. This client was working perfectly in VC6.0, but when I ported to VC8, it started showing link error: Signature of the Function in the library[DLL] Header: ULONG sendInfo(const bool isRequest, TCHAR pParameters[MESSAGES_PARAMS][MESSAGE_SIZE], ULONG netCallId); Implementation of the Function in the library[DLL] Source: ULONG NIHAI_TAPI::sendInfo(const bool isRequest, TCHAR pParameters[MESSAGES_PARAMS][MESSAGE_SIZE], ULONG netCallId) { .... .... .... } Client Application Call: TCHAR messageParameters[MESSAGES_PARAMS][MESSAGE_SIZE]; ULONG netCallId; bool request; returnCode = tapiConnection.sendInfo(request, messageParameters, netCallId); But I'm getting a link error: nihai_worker.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: unsigned long __thiscall NIHAI_TAPI::sendInfo(bool,unsigned short (* const)[81],unsigned long)" (__imp_?sendInfo@NIHAI_TAPI@@QAEK_NQAY0FB@GK@Z) referenced in function "private: unsigned long __thiscall NIHAI_Worker::sendToTAPI(unsigned int,unsigned short (* const)[81],unsigned long)" (?sendToTAPI@NIHAI_Worker@@AAEKIQAY0FB@GK@Z) Kindly suggest a resolution for the above problem. Thanks in Advance. regards, Rajesh

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

  • CryptAcquireContext fails with NTE_BAD_KEY_STATE
    R Rajesh_Parameswaran

    Hi, My application fails after making a call to the Windows CryptAcquireContext API. I get the following error code NTE_BAD_KEY_STATE ( 0x8009000BL ). Code snippet and details below: //////////////////////////////////////////////////////////////////////////////// /* @func UINT32 | get_key | * Description: Get encryption key. In order to do this need to * acquire encryption context and hashing object. * *--------------------------------------------------------------------- */ //////////////////////////////////////////////////////////////////////////////// UINT32 get_key(TCHAR * szPassword, HCRYPTPROV * phProv, HCRYPTHASH * phHash, HCRYPTKEY * phKey) { ... ... // Get handle to user default provider. rc = CryptAcquireContext(phProv, NULL, MS_DEF_PROV, PROV_RSA_FULL, 0); if(!rc) { lRet = GetLastError(); if (lRet == NTE_BAD_KEYSET) { // create default key container if (!CryptAcquireContext(phProv, NULL, MS_DEF_PROV, PROV_RSA_FULL, CRYPT_NEWKEYSET)) { lRet = GetLastError(); } } } ... ... } The first call to CryptAcquireContext() here fails with NTE_BAD_KEY_STATE, and there isn't sufficient information available on MSDN bout the error code. All I got was that the error returned from the failing API suggests that the user password has changed since the private keys were encrypted. But there weren't any sort of user modifications done recently on my machine. The issue occurs on a Win2K3 HP server. But it seems to be happening only on one of my servers and works fine on others. Any ideas as to what might be going wrong here? I know that re-installing the OS here would fix this (cause it happened on another machine in the past and the only way out that time was re-installing the OS). But re-installing the OS here would mean a lot of work to be re-done at this point for me. Has anyone encountered such a problem in the past, if so, how was it resolved? Thanks in advance! - Benson

    C / C++ / MFC help sysadmin docker security json

  • Exporting Makefile inVC++.Net (2005)
    R Rajesh_Parameswaran

    Hi KarstenK, I'm looking for a Microsoft Developer Studio Generated NMAKE File. There was an option to generate the .mak file in Visual C++ 6.0 Version [Project->Export MakeFile], that option is not available in Visual Studio.Net. I'm looking for that. Please share if you know how to generate . thanks and regards, Rajesh

    C / C++ / MFC csharp c++ visual-studio tutorial question

  • Exporting Makefile inVC++.Net (2005)
    R Rajesh_Parameswaran

    Hi All, I'm trying to compile a project, which is in VC++.Net using Visual Studio 2005. In Visual VC++6.0 there is an option 'Export Makefile' under the Project menu, for creating the makefile for a project. I'm using a custom build application, which will scan for all the .mak file and try to build the components. As a part of migration to VC++.Net, I need to generate the makefiles for the projects. But the menu option for the same is not available in .Net. I tried creating a new project in VC.Net, but ultimatly went in vain. I dont what option I should provide. I am new to .Net. Kindly let anyone know how to create a makefile in VC.Net? thanks and regards, Rajesh

    C / C++ / MFC csharp c++ visual-studio 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