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
S

Sivakumar R

@Sivakumar R
About
Posts
12
Topics
4
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • link error while load dll explicitly
    S Sivakumar R

    hi all iam facing link error "unresolved externall symboll" while loading my dll explicitly, but it work i load implicitly, here i given the sample by which i tryed, and i defined all the virtual function in the derived class, which in the base class #include "stdafx.h" #include "windows.h" int main(int argc, char* argv[]) { typedef UINT (CALLBACK* LPFNDLLFUNC1)(DWORD,UINT); HINSTANCE hDLL; // Handle to DLL LPFNDLLFUNC1 lpfnDllFunc1; // Function pointer UINT uParam2, uReturnVal; DWORD dwParam1; //HMODULE dll_module = LoadLibrary("./../TestDll/Debug/TestDll.dll"); hDLL = LoadLibrary("./../TestDll/Debug/TestDll.dll"); if (hDLL != NULL) { lpfnDllFunc1 = (LPFNDLLFUNC1)GetProcAddress(hDLL, "MyAbsFunc1"); if (!lpfnDllFunc1) { // handle the error FreeLibrary(hDLL); return 0; } else { // call the function uReturnVal = lpfnDllFunc1(dwParam1, uParam2); } } return 0; } can any one help to solve this link error

    C / C++ / MFC help debugging

  • DataGridView
    S Sivakumar R

    You can try Void dataGridView1_CellContentClick(System::Object^ sender, System::Windows::Forms::DataGridViewCellEventArgs^ e) { String^ strVal = dataGridView1->Rows[e->RowIndex]->Cells[0]->Value->ToString(); }

    Managed C++/CLI question

  • C# How to display a PDF file from Windows app?
    S Sivakumar R

    You can use WebBrowser control in your form and call webBrowser1->Navigate() to open the file in the browser.

    Managed C++/CLI question csharp help tutorial

  • to convert string^ to const char*
    S Sivakumar R

    It is advisable to call Marshall::FreeHGlobalAnsi(IntPtr(var)); to clear the memory

    Managed C++/CLI question

  • To add a class to the project
    S Sivakumar R

    1. You can just copy the .h/.cpp files in to the project folder. 2. Right click on the Project in the Solution Explorer and selecct Add->Existing Items 3. Select all the .h / .cpp files from the open file dialog 4. It will add your existing classes into the project If you want to add the files from the different folder than your project folder, make sure you set the include path correctly. Regards, Sivakumar R

    Managed C++/CLI c++ question

  • Problem accessing network printers from Services
    S Sivakumar R

    Hi, Thanks for the reply. I had to make my application to toggle between the OS and Application. When the user login as an administrator in my app and shutdown, it should restart into the OS. When they restart from the OS, then it should go to the applicaiton mode. So I had to go for the service to decide whether to start the application of just go to the OS. Everything works well and running except that I could not access the network printer. It works well with the local printer. I am just trying to get if we set any security attributes before starting the service / my process, is there anyway I can access the network printer. I sincerely thanks for your valuable suggestions!! Regards, Sivakumar R

    C / C++ / MFC help sysadmin question

  • Problem accessing network printers from Services
    S Sivakumar R

    Hi, You are right. The service is currently running as a local system account. But I have one more limitation here. My application is a Desktop Application, I am starting this through a Service to grant/deny some rights to my application. So the service needs to be on a Local System Account to enable this option. I tried configure the service to work with the network user. But unfortunatly, my application is not displaying the GUI. I gone through the following article : http://www.codeproject.com/install/...vicedesktop.asp to try to enable the service to interact with the service. But it does not seems to be working. Here is what I was trying to do.. - I tried to login as a network user - I change the Logon properties of the service to work with a specified account. Is it possible to make the service to interact with the desktop even if we set it not as a local system account? Thanks a lot for your suggestions!! Regards, Sivakumar R

    C / C++ / MFC help sysadmin question

  • Problem accessing network printers from Services
    S Sivakumar R

    Hi All, I have an application that tries to print a PDF File to a network printer from the WebBrowser control. I am able to print the report if I just run the exe directly. But when I tried to start the application from a service as a new process then it could not find the network printers. Is there any secruity permissions to be applied when starting a new process from the service? Or what could be of the cause and its possible solutions? Kindly help me.. I am just struggling a lot in this!! Thanks, Sivakumar R

    C / C++ / MFC help sysadmin question

  • COM and DLL !!!!
    S Sivakumar R

    You no need to add key file unless it is to be put in Global Assembly Cache. In the command prompt you just move to your project folder and then to bin\debug. Type the following in the command prompt >regasm .dll /tlb: /codebase Here the /codebase switch is important. It will set the code base in the registry. Now, you will be able to access the component in com client.

    C# help csharp com visual-studio question

  • TAB Key problem in COM Client Vs C# Component
    S Sivakumar R

    I meant, using COM Interop I have imported the .C# component to COM component. These are the steps to create the COM Interop component in C# 1. Create a class library or windows control library project. 2. Add the required methods. 3. Goto Project-> Propeties and select Build 4. Check Register for COM Interop option 5. Compile the project 6. use the regasm.exe utility to register create type library and register the components with /codebase switch (ex : >regasm mycontrol.dll /tlb:mycontrol.tlb /codebase 7. Now the assembly is registered in your system. 8. Open the vb project and add reference for this component. 9. Now you can access the .NET component in vb6 as if you access other components. Thanks Sivakumar R

    C# csharp question visual-studio com

  • TAB Key problem in COM Client Vs C# Component
    S Sivakumar R

    Hi all, My requirement is to develop a Windows Control Library in C# and use that control in COM Client (VB6). Well! I was able to do all these succssfully. But while clicking TAB key on my control, when it is displayed in the COM Client, it does not behave as expected. ie, it is not moving it focuses to the next control. It doesn't look like it is recognizing the TAB key click event. I understand that it is a problem with message loop that the .NET control uses and the message loop that the COM client application provides are fundamentally different. How can I solve this problem? Please suggest me some code snippets. Thanks in Advance!!! Sivakumar R

    C# csharp question visual-studio com

  • Fireing events from worker thread
    S Sivakumar R

    Hi, I have written a dll using ATL. In which I want to fire events from a call back function. When I tried to do that my program crashes. So that I have implemented a hidden window (which I saw in an article in this site) and posting the message to that window. From there I fire the events. It is working quite fine. But my problem is, when I closes the application which used my COM object, it crashes at the end. I cannot trace what is the problem. I describe here step by step what I have written in my program.. 1. This is the hidden window i have created.. // mywnd.h : header file // ///////////////////////////////////////////////////////////////////////////// // CMyWindow window class CClsRecord; class CMyWindow : public CWnd { // Construction public: LRESULT OnFireEventForThread(WPARAM wParam, LPARAM lParam); CClsRecord *m_pControl; HWND Create(); CMyWindow(CClsRecord *pCtrl); // Attributes public: // Operations public: // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CMyWindow) protected: virtual void PostNcDestroy(); //}}AFX_VIRTUAL // Implementation public: virtual ~CMyWindow(); // Generated message map functions protected: //{{AFX_MSG(CMyWindow) // NOTE - the ClassWizard will add and remove member functions here. //}}AFX_MSG DECLARE_MESSAGE_MAP() }; ///////////////////////////////////////////////////////////////////////////// HWND CMyWindow::Create() { //Register a window class LPCTSTR classname = 0; classname = AfxRegisterWndClass(0); //Create the window and return it's handle CWnd::CreateEx(NULL,classname,NULL,NULL,1,1,1,1,NULL,NULL); ASSERT(m_hWnd!=NULL); return m_hWnd; } LRESULT CMyWindow::OnFireEventForThread(WPARAM wParam, LPARAM lParam) { CComBSTR bstr; //This is a one-message-does-everything handler. If wParam is not //set, that means our message has been sent to fire the even. //If wParam is set that means we're being asked to destroy ourselves if(!wParam) { if (lParam!=NULL) { bstr = m_pControl->GetEventMessage(); m_pControl->Fire_OnEvent(lParam,bstr.Copy()); } } else if(wParam==1) DestroyWindow(); return TRUE; } void CMyWindow::PostNcDestroy() { //clean up this object delete this; } 2. In the ClsRecord class, I have created a thread like this CMyWindow *pWnd = new CMyWindow(this); HWND hwndTarget = pWnd->Create(); //create a thread for handling all the events HANDLE threadHandle = CreateThread

    ATL / WTL / STL c++ com debugging help 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