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
G

Gaul

@Gaul
About
Posts
60
Topics
20
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • What Is The Best Way To Print Simple Reports From ASP.NET Applications
    G Gaul

    What is the best way to produce and print simple reports from an ASP.NET application? I have an application hosted on a public web site (public hosting company), and would like to print simple reports without using such things as Crystal Reports since I have no access to the web server machine. You could point me to any useful source for printing reports via an ASP.NET application.

    ASP.NET

  • What Is The Best Way To Print Simple Reports From ASP.NET Applications
    G Gaul

    What is the best way to produce and print simple reports from an ASP.NET application? I have an application hosted on a public web site (public hosting company), and would like to print simple reports without using such things as Crystal Reports since I have no access to the web server machine. You could point me to any useful source for printing reports via an ASP.NET application.

    Web Development

  • Placing/Integrating a Web Service With A Web Site
    G Gaul

    Thanks for your suggestion. We tried it on the intranet, and it worked. We are yet to try it on the publicly hosted website. We have no access to IIS on the hosting company's machine, but would request that they create the applicaton for us. I believe it should work also. Gaulles

    ASP.NET

  • Placing/Integrating a Web Service With A Web Site
    G Gaul

    We have a publicly hosted website (hosted by a hosting company) that is used for capturing data that is stored in a database, and need to be able to download that data at periodic intervals to a server on company intranet. One solution we have considered is to place a Web Service on the Web Site, or in a subdirectory of the website. That does not seem to be working as the Web Service is returning an error of content-type of text/html when text/xml is being expected. "Client found response content type of 'text/html; charset=utf-8', but expected 'text/xml'...". The website has a global.aspx handler that is processed for each request, and one of the things that does is to read a configuration file that is used to populate the pages to be displayed. The webservice does not require the global.aspx, but even when we place the webservice in a subdirectory of the website, it looks like the global.aspx is still being processed, and this may be responsible for the text/html being returned. Are we doing it right? Will appreciate any suggestions or alternatives on how to go about this. We want to place the web service so that it can be called from applications on the intranet to read the data from the same database as the web application. Gaulles

    ASP.NET

  • What Is Your Best Advice For Getting Projects To Work At Home [modified]
    G Gaul

    What is your best advice on how to get a steady stream of projects if one prefers to work at home. Any sites you can recommend? I have worked as an independent for years now, and enjoy the independence, but the hardest part is how the get the next project after the current one is done. What have you found to be the most effective? Any specific sites, adverts, suggestions would be welcomed. I currently live outside the USA, and have very talented staff, but need to find a way to keep myself and my staff busy. We would gladly travel for projects, and have no problems with visas to the USA or most European cities. I used to live in the USA. Gaul -- modified at 13:40 Sunday 28th May, 2006

    The Lounge

  • How to pass a delegate object with parameter as input to a ThreadStart constructor?
    G Gaul

    Why can't you pass the reference to ArrayList in the constructor for ClassA()? Gaulles

    C#

  • Where to get the COM+ Current Object Count
    G Gaul

    How do you get the count of the currently executing objects in a COM+ application. I need to track the number of objects currently running as the objects are created and destroyed. I have been looking at the COM+ Administration Collections, and so far it seems that most of the collections are not for the live objects (objects currently running). Where else should I be looking? Thanks Gaul Gaulles

    .NET (Core and Framework)

  • Where to get the COM+ Current Object Count
    G Gaul

    How do you get the count of the currently executing objects in a COM+ application. I need to track the number of objects currently running as the objects are created and destroyed. I have been looking at the COM+ Administration Collections, and so far it seems that most of the collections are not for the live objects (objects currently running). Where else should I be looking? Thanks Gaul Gaulles

    COM

  • Help: Unable To Copy Data (In Structure) from Unmanged MFC/C++ App to .NET
    G Gaul

    I need to copy and send the data in a private structure from an MFC app to a .NET app. Somehow, the following does not seem to work. When I use the WM_COPYDATA windows message as indicated below, it is not being received by the WndProc on the .NET side, but when I use a private message, it is received. Unfortunately, when I use the private message, the data seems not to be copied across and I get an assertion error for null data. WM_COPY is not received on the .NET side, but when a private message is used, it is received but then Marshal.PtrToStructure asserts reporting a null value. Using COM interop is not an option. The client thinks that COM will slow things down as the function is called thousands of times. Does any one have a suggestion, or a better approach? Thanks Gaul **************************** ON THE MFC SIDE **************************** //////////////////////////////////////////////////////////// // Increment is called on the MFC side /////////////////////////////////////////Increment Counter long CTSPerfMon::Increment(int objectID, int instID) { _msg.nMsgID = TS_MSG_INCREMENT; _msg.nObjectID = objectID; _msg.nInstID = instID; _msg.nValue = -1; return SendMessage(); } // Send Message across to the .NET side module long CTSPerfMon::SendMessage() { // Fill the WIN32 COPYDATASTRUCT structure _copyData.dwData = _nPerfMsg; // Message identifier _copyData.cbData = sizeof(_msg); // size of data _copyData.lpData = &_msg; // data structure // Call function, passing data in &_msg long nRetCode = -1; if ( _hPerfWnd != NULL ) { HWND hWnd = GetForegroundWindow(); if (hWnd == NULL) hWnd = GetDesktopWindow(); nRetCode = ::SendMessage( _hPerfWnd, WM_COPYDATA, //private message works here (WPARAM)(HWND) hWnd, //windows sending the data (LPARAM)(LPVOID) &_msg); } return nRetCode; } **************************** ON THE C# .NET SIDE **************************** protected override void WndProc(ref System.Windows.Forms.Message m) { if (m.Msg == (int) Msgs.WM_COPYDATA) { COPYDATASTRUCT copyData = (COPYDATASTRUCT) Marshal.PtrToStructure(m.LParam, typeof(COPYDATASTRUCT)); if ((object) copyData != null) { IntPtr nPerfMsg = copyData.dwData; if (nPerfMsg.ToInt32() == _nPerfMsg) { TSMSG msg = (TSMSG) Marshal.PtrToStructure(copyData.lpData, typeof(TSMSG)); int nRetCode = ProcessMessage(ref msg); m.Result = (IntPtr) nRetCode; r

    .NET (Core and Framework)

  • Help: Unable To Copy Data (In Structure) from Unmanged MFC/C++ App to .NET
    G Gaul

    I need to copy and send the data in a private structure from an MFC app to a .NET app. Somehow, the following does not seem to work. When I use the WM_COPYDATA windows message as indicated below, it is not being received by the WndProc on the .NET side, but when I use a private message, it is received. Unfortunately, when I use the private message, the data seems not to be copied across and I get an assertion error for null data. WM_COPY is not received on the .NET side, but when a private message is used, it is received but then Marshal.PtrToStructure asserts reporting a null value. Using COM interop is not an option. The client thinks that COM will slow things down as the function is called thousands of times. Does any one have a suggestion, or a better approach? Thanks Gaul **************************** ON THE MFC SIDE **************************** //////////////////////////////////////////////////////////// // Increment is called on the MFC side /////////////////////////////////////////Increment Counter long CTSPerfMon::Increment(int objectID, int instID) { _msg.nMsgID = TS_MSG_INCREMENT; _msg.nObjectID = objectID; _msg.nInstID = instID; _msg.nValue = -1; return SendMessage(); } // Send Message across to the .NET side module long CTSPerfMon::SendMessage() { // Fill the WIN32 COPYDATASTRUCT structure _copyData.dwData = _nPerfMsg; // Message identifier _copyData.cbData = sizeof(_msg); // size of data _copyData.lpData = &_msg; // data structure // Call function, passing data in &_msg long nRetCode = -1; if ( _hPerfWnd != NULL ) { HWND hWnd = GetForegroundWindow(); if (hWnd == NULL) hWnd = GetDesktopWindow(); nRetCode = ::SendMessage( _hPerfWnd, WM_COPYDATA, //private message works here (WPARAM)(HWND) hWnd, //windows sending the data (LPARAM)(LPVOID) &_msg); } return nRetCode; } **************************** ON THE C# .NET SIDE **************************** protected override void WndProc(ref System.Windows.Forms.Message m) { if (m.Msg == (int) Msgs.WM_COPYDATA) { COPYDATASTRUCT copyData = (COPYDATASTRUCT) Marshal.PtrToStructure(m.LParam, typeof(COPYDATASTRUCT)); if ((object) copyData != null) { IntPtr nPerfMsg = copyData.dwData; if (nPerfMsg.ToInt32() == _nPerfMsg) { TSMSG msg = (TSMSG) Marshal.PtrToStructure(copyData.lpData, typeof(TSMSG)); int nRetCode = ProcessMessage(ref msg); m.Result = (IntPtr) nRetCode; r

    C#

  • Runing a run window in os?
    G Gaul

    You could write a dialog box that does the same thing, basically prompting the user for the name of the exe/program, and then passing the information to ShellExecute or CreateProcess (WIN32 API). If you are using C#, then you could use Process class. Gaulles http://www.gaulles.com

    C#

  • How Do You Resolve Performance Counter (PerfLib) 8-Byte Alignment Warning (Event ID 1016)
    G Gaul

    I am getting the warning that the performance counter DLL is not aligned on an 8-byte boundary. I originally thought the warning was being caused by our code, but even the Microsoft sample codes, ScribbleMouse and HWInputMon written by Jeffrey Richter (MSJ Aug 1998), are giving the same warnings when I recompiled them. I checked the allocation size in the case of the ScribbleMouse, and at 160 bytes, seems to be properly aligned. Does anyone know of a solution to this, or how to resolve the problem. I have looked at the KB Q262335 referred to below, and have tried various options without luck. HOWTO: Align Performance Data of a Performance Extension DLL on an 8-Byte Boundary SUMMARY When the performance data buffer returned by a performance extension DLL is not aligned on an 8-byte boundary, the performance library (PERFLIB) part of ADVAPI32.dll will report a warning 1016 to the Application Log in Event Viewer. This article explains how the developer of a performance extension DLL can align the performance data on an 8-byte boundary. Gaulles http://www.gaulles.com

    C / C++ / MFC

  • give sample code plzz?
    G Gaul

    What is the Exception you are getting? Also, when you say that the C# portion executed successfully, what do you mean exactly. Can you provide more details. If possible, can you post appropriate sections of your code to make things clearer? Gaulles http://www.gaulles.com

    C#

  • give sample code plzz?
    G Gaul

    You use the sn.exe to generate a signed name key file, but you also need to add the key file to your assembly. If you created your project with VS.NET, you should have an AssemblyInfo.cs which contains a number of attributes. In your AssemblyInfo.cs, modify the AssemblyKeyFile attribute to include your key file as follows depending on the location of your key file: [assembly: AssemblyKeyFile(@"..\..\keyfile.snk")] or [assembly: AssemblyKeyFile(@"keyfile.snk")] Gaulles http://www.gaulles.com

    C#

  • Is Windows Shutting Down
    G Gaul

    When the user initiates a shutdown, or when the OS is is about to shutdown, Windows sends out the WM_QUERYENDSESSION to all top level applications. Applications should return a non-zero to allow the the shutdown to continue. If any application returns zero, the session is not ended. The system stops sending WM_QUERYENDSESSION messages as soon as one application returns zero. You could override the WndProc (Window Procedure) for you main form, and watch for the WM_QUERYENDSESSION message. public enum Msg { WM_QUERYENDSESSION = 0x0011, WM_QUIT = 0x0012, WM_ENDSESSION = 0x0016, } protected override void WndProc(ref Message m) { switch(m.Msg) { case (int)Msg.WM_QUERYENDSESSION: // your code to handle the end session or respond to it break; default: base.WndProc(ref m); break; } } Gaulles http://www.gaulles.com

    C#

  • give sample code plzz?
    G Gaul

    You need to check your security/permissions for the network drive. Dot Net has code access security that checks to see if the code is running from or is loaded from an authorized location. The default security policy setting does not allow you to load and execute code from a network drive. To see if that is your problem, go to Administrative Tools | .NET Framework Configuration | Configure Code Access Security Policy (same as Runtime Security Policy. Then select Adjust Zone Security, the checkbox 'Make changes to this computer', and then Local Intranet. You can change it to 'Full Trust' and then run your code again. Be careful, and make sure you know what you are doing. You can reset it back to what it was after you have been able to test your code to see if that is your problem. Gaulles

    C#

  • Exporting Jobs to Eastern Europe
    G Gaul

    Have you considered Nigeria. I am based in the US essentially for marketing purposes, but have an excellent team I work with in Nigeria. Most people do not consider places like Nigeria, yet Nigeria provides you with very much the same skill sets, English speaking (Official language), and at a fraction of the cost. I mean perhaps half the cost of India, and perhaps lower than Eastern Europe. It is also about 5 - 6 hours flying time from most European capitals. Granted, they were largely unknown in the I/T field due largely to years of represive military dictatorships, but all that has changed in the last few years. Gaulles

    The Lounge

  • Why Can I Find C++ or C# Code Samples/Libraries For Sending/Receiving SMS Messages To GSM-enabled Phones
    G Gaul

    I have a project for developing an application that will be sending and receiving SMS messages to GSM enabled wireless devices, phones, POS etc over GSM network. The application will send messages in response to a request from the device. Why Can I Find C++ or C# Code Samples For Sending/Receiving SMS Messages To GSM-enabled Phones. I have looked at the NOKIA site, and similar others but most of what is available are for Java. I have not been able to find a lot of MS SmartPhone devices already in the market that one can develop/test on. Any input would be appreciated. Gaulles

    Mobile

  • Detect the path where is running an application VC++
    G Gaul

    An example: char szDrive[_MAX_DRIVE]; char szDir[_MAX_DIR]; char szFileName[_MAX_FNAME]; char szExt[_MAX_EXT]; char szBuffer[_MAX_PATH]; // get path of executable GetModuleFileName(NULL, szBuffer, _MAX_PATH); // split into parts, to get the Path const char* pFilePath = szBuffer; _splitpath(pFilePath, szDrive, szDir, szFileName, szExt); CString strPath; strPath.Format("%s%s", szDrive, szDir); TRACE("File Path is %s\n", strPath); Gaulles

    C / C++ / MFC

  • Help File
    G Gaul

    What do you recommend for creating/editing the help file text/source? Gaulles

    C / C++ / MFC
  • Login

  • Don't have an account? Register

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