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
M

Mike Doner

@Mike Doner
About
Posts
75
Topics
54
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Visio Symbols in your Application.
    M Mike Doner

    Thanks for your reply. We're looking to take Visio-like symbols and draw them in our view. Would like the user to be able to select the .VSS file, select the symbol and draw it. You're method appears to be a one-off method. Are the VSS file formats published anywhere?

    C / C++ / MFC graphics help question

  • Visio Symbols in your Application.
    M Mike Doner

    I'm looking for a graphics library/method for drawing visio-symbols in your own DC/view. Anybody stumbled across something like this? Any help would be appreciated, Thx.

    C / C++ / MFC graphics help question

  • Handle Leak when Compiling with /clr Option, and _beginthread.
    M Mike Doner

    Hi all, Hoping you can help me out. I've been trying to track down a handle leak in our product for the last few days, and I've gotten to the point where I suspect something is happening outside of our code. It seems that everytime my application calls _beginthread, there is 5 handles that leak. This happens to be our Server application, which receives many requests and calls to _beginthread, so after a period of time, this gets ugly. This application is compiled with /clr to use code written in a .DLL for LDAP Authentication. But regardless of whether nor not any C#/DLL code gets ran, we're still leaking. I commented EVERYTHING out, except a call to _beginthread. Inside the thread proc, all I do is call _endthread... And the problem still occurs - 5 handles on every call.. This is verified using Process Explorer and the WinDbg tool. If I turn off the /clr flag, and the problem goes away... I did a !htrace in WinDbg, and this is what its showing me.. Outstanding handles opened since the previous snapshot: -------------------------------------- Handle = 0x00000240 - OPEN Thread ID = 0x00003754, Process ID = 0x000038a4 0x77cb4210: ntdll!ZwCreateEvent+0x0000000c 0x7796b857: KERNEL32!CreateEventExW+0x0000006e 0x7796b8a6: KERNEL32!CreateEventW+0x00000027 0x72b86fdf: mscorwks!CLREvent::CreateManualEvent+0x00000027 0x72b21575: mscorwks!Thread::AllocHandles+0x0000009b 0x72b235e2: mscorwks!Thread::InitThread+0x000001a4 0x72b21f21: mscorwks!SetupThread+0x000002b2 0x72bf9aac: mscorwks!IJWNOADThunk::FindThunkTarget+0x00000019 0x72bf9f39: mscorwks!IJWNOADThunkJumpTargetHelper+0x0000000b 0x72a21ae1: mscorwks!IJWNOADThunkJumpTarget+0x00000048 0x0f59dbd3: MSVCR90D!_beginthread+0x00000233 0x0f59db6e: MSVCR90D!_beginthread+0x000001ce 0x7796d309: KERNEL32!BaseThreadInitThunk+0x0000000e -------------------------------------- Handle = 0x0000023c - OPEN Thread ID = 0x00003754, Process ID = 0x000038a4 0x77cb4210: ntdll!ZwCreateEvent+0x0000000c 0x7796b857: KERNEL32!CreateEventExW+0x0000006e 0x7796b8a6: KERNEL32!CreateEventW+0x00000027 0x72b86fdf: mscorwks!CLREvent::CreateManualEvent+0x00000027 0x72b21569: mscorwks!Thread::AllocHandles+0x0000008f 0x72b235e2: mscorwks!Thread::InitThread+0x000001a4 0x72b21f21: mscorwks!SetupThread+0x000002b2 0x72bf9aac: mscorwks!IJWNOADThunk::FindThunkTarget+0x00000019 0x72bf9f39: mscorwks!IJWNOADThunkJumpTargetHelper+0x0000000b 0x72a21ae1: mscorwks!IJWNOADThunkJumpTarget+0x00000048 0x0f59dbd3: MSVCR90D!_beginthread+0x00000233 0x0f59db6e: MSVCR90D!_be

    Managed C++/CLI help csharp dotnet sysadmin security

  • What language/tool would you use to create...
    M Mike Doner

    Hi there, Not sure if this is the right forum or not, but I thought I'd ask away. Our product is thick client/server architecture. We have created a Web-based interface for our product using ASP.NET which does some basic lookups/field changes. We want to take it a step further and create a custom control within a webpage to show our floor-plan module. Our thick client is written in C/C++, and I realize that in order to do what we want, we would need to port this code over to something a little more browser friendly. Question: What language/tools would give me the ability to: a) Have a canvas where I can custom draw lines, shapes etc. b) Get Click, Mouse Move events .. All within a web-browser? Any help/links you could provide would be great. Cheers. M.

    ASP.NET question csharp c++ asp-net sysadmin

  • CLI/BOOL to bool conversion.
    M Mike Doner

    Thanks Nish, That did it... I knew it had to be simple. Cheers. M.

    Managed C++/CLI csharp question c++ help

  • CLI/BOOL to bool conversion.
    M Mike Doner

    I've got a C++ app that makes calls into a C# library. One of the calls in the C# lib is: void myFunc ( bool Flag ) I've done some marshalling for strings in other functions, but the bool has me scratching my head. How do I convert my C++ BOOL to a .NET bool for my C# call? What am I overlooking? Any help you could send would be appreciated. Cheers. Mike.

    Managed C++/CLI csharp question c++ help

  • LDAP DirectoryEntry and Exceptions.
    M Mike Doner

    I'm doing some work with Active Directory using C# and the DirectoryEntry object. I'm fairly new to C# and exceptions, go easy on me! Some Code:

            DirectoryEntry entry = new DirectoryEntry ( LDAPServer, domainAndUsername, Password );
    
            try
            {
                // Bind to the native AdsObject to force authentication.
                Object obj = entry.NativeObject;
            }
            catch (Exception ex)
            {
                ErrorMessage = ex.Message;
                return false;
            }
    

    Now, it seems that when binding to the DirectoryEntry fails, the exception is called. The error is returned as a string, which gives me an idea as to what happened, But how do I test what the error was programmatically? Is there some kind of numeric value as well in the exception that I can test? Basically, I want to know if the connection failed because of a bad ldapserver, or a username/password mismatch etc. I'm trying to create code that does a fail-over to a second ldap server if the primary ldap server is offline. I don't want to jump to the second server to retry the authentication, if there was an error with the credentials. Is there another exception I can test for here? How would I found out what other exceptions are available for this object? Any help you could give would be great.. Heck, I'll buy you a beer! Mike

    C# help question csharp c++ wpf

  • Active Directory/LDAP.
    M Mike Doner

    Thanks for your reply - much appreciated. I'm finding lots of code related to group membership (IsInRole etc) for C#, but not a whole lot in Win32, any help? Also, is there a way I can query for a list of users in the group? Again, thanks alot for your reply. M.

    C / C++ / MFC c++ csharp sysadmin windows-admin testing

  • Active Directory/LDAP.
    M Mike Doner

    Hi all, We have a client/server (C/C++/MFC/Win32) application that historically has used an internal table for managing users/passwords/product permissions etc. We've had a request from a customer to manage these types of things via Active Directory and take advantage of Single Sign-on etc. I know very little about Active Directory since we don't use it here in our office, but I've done a fair amount of reading and managed to set one up in a VM for testing purposes. Questions: 1) Since much of our product depends on OUR UserID table and we have some customers that want to use AD , I'm thinking we should be importing account information FROM Active Directory periodically. Does this sound right? 2) When a user logs in - I should be authenticating the user through Active Directory and NOT our internal mechanism? 3) Does Active Directory have a means for me to define a list of permission options that the ADMIN can manage? ie: Add Record, Delete Record, Update Record, that I can check against when one of these operations are performed in our product. 4) I have found a lot of AD code in C# but, having a harder time finding stuff in C++. Anyone have any good examples? Anything you could forward my way would be greatly appreciated. Cheers. Mike.

    C / C++ / MFC c++ csharp sysadmin windows-admin testing

  • Class View - "Add" menu item is missing for some classes.
    M Mike Doner

    Quick Question.. Not sure what's happening, but for some classes, when I right click, the "Add" menu item is missing completely, leaving me without the functionality to Add a Variable or Function. I also notice that when I click Properties, all the fields for this class are read-only. I notice that the classes than I CAN "Add" to, have a ">" to the left of them in the display, and some of the fields are read/write. I'm sure its something simple I'm overlooking, its driving me crazy! Using VS.2010. Mike

    C / C++ / MFC visual-studio question

  • Visual Studio 2010 - Incremental Build Problem
    M Mike Doner

    I installed VS.2010 yesterday, and to my surprise our project build without any major hiccups! ;-) I do notice now though, that after doing a full/clean compile, if I try to "build" again (which I assume will be an incremental build), it tends to build files that it thinks are stale, but in fact, are not. Nothing has changed to any of the projects. Anyone seen anything like this? I've done the usual, check file dates/times vs. system time etc. Anyone have any tips you could send my way? Cheers. Mike.

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

  • Consumig WebService from C++.
    M Mike Doner

    Thank you for your reply. As I said, this is all pretty new to me, so I'm doing a bit of feeling around for getting it to work. I was able to create a C# proxy without any problems, and from a C# project, I can call the WebService. I've created a C# Class that has a WebService, with all the parameters I need, including setting the URL. Now, to call this from the C++ side... Were you suggesting all the C# stuff being in a .DLL, then calling those functions from the C++ side? Is there a way to put a .cs into a project and have it all compile together into one project? I found a sample online (may have been here on CP), that has a MFC project, and it shows how to use a C# object from the MFC side, including all the string marshalling. Is there an easier way? Thanks again... I'm getting closer! ;-)

    C / C++ / MFC csharp c++ com tutorial question

  • Consumig WebService from C++.
    M Mike Doner

    Hi all, I'm trying to find the best/easiest way to consume a WebService in my application which is written in C/C++. I've seen and tried numerous examples over the course of the last few days, and there seems to be pros and cons no matter which way I go. I thought I'd ask you folks your opinion. I turned on the "/crl" option on in my project, and added a WebReference. I was able to call the WebService without any problems, but I'm unsure how to handle exceptions when something goes wrong (ie: address is no longer valid). If everything is up and running and things are successful, there are no problems.

    Test_WSService obtws;

    try
    {
    obtws.Url = "http://localhost:8088/mockObtain\_WSSoapBinding1";
    obtws.UpdateObject ( "A", "B", "C" );
    }
    catch ( ??? )
    {
    }

    With whatever route I go with, I'd like to be able to change the destination url on the fly as this will be specified in a user-modifiable configuration file. My knowledge of COM is almost nil. I've seen examples where a developer did all the WebService consuming in a C# dll, and just called that from the C++ application as well. Whats your past experiences, recommendation? Anything you could forward would be helpful. Cheers. Mike.

    C / C++ / MFC csharp c++ com tutorial question

  • WebServices/WSDL
    M Mike Doner

    I was able to do what I wanted to do by using a tool called SoapUI. This allows you to create a mock-up WebService using the provided WSDL. Thanks for your help. Mike.

    ASP.NET question wcf testing sales beta-testing

  • WebServices/WSDL
    M Mike Doner

    Hi Abhijit. My problems are strictly server-side. I want to emulate an existing server side WebServices implementation. I have the existing WSDL file, and I want to create a similar Server-Side WebServices project to test my client-code. After that, its gravy.. As I understand web-services and the steps you've provided, this is to create a reference on the client side. Am I misunderstanding? M.

    ASP.NET question wcf testing sales beta-testing

  • WebServices/WSDL
    M Mike Doner

    Thanks for your reply Abhijit. I have no problems adding a reference on the client side, its trying to call the methods that brings out the newbie in me. I successfully ran the WSDL command and it created the .cs file. Now what? Do I create a new webservices project and add this in? When I did this, I could not get the WebService to expose the methods from my imported WSDL, am I missing something? M.

    ASP.NET question wcf testing sales beta-testing

  • WebServices/WSDL
    M Mike Doner

    Hi all. I'm fairly new to WebServices etc, so go easy on me if this is a really easy question to answer :-) Also, I hope I posted this in the right section.. We're doing work for a customer of ours for which we consume they're webservices. We want to do some testing in-house here before testing in the production environment, and would like to create a working webservice, using they're WSDL definition. I've poked around on google, and found some steps to create a web-services proxy, but is this the same thing? There are quite a few methods in the WSDL, it would be painful to have to define each of them manually. Any information you could forward, would be helpful. Hope the Easter bunny was good to everyone.

    ASP.NET question wcf testing sales beta-testing

  • Service Programming - How to tell if the current process is running as a Windows Service..
    M Mike Doner

    I'm writing a .DLL that's being used in both our Client and Server application. Is there a windows call I can use that will tell me if the current process is running as a windows service or not? Thnx. M.

    C / C++ / MFC sysadmin tutorial question

  • Release Build, Symbols, Debugging Unreproducable Crashes.
    M Mike Doner

    Hi all, I've done quite a bit of reading over the last few days with regards to analyzing application crash dumps etc. I've got a customer who occasionally gets an application crash that we're unable to reproduce here. The code looks fine, we have no idea whats going on. From what I'm reading, I can have the customer send me the crash dump fro Dr. Watson, then open it up to see where the FAULT is. Understood, no problems so far. As a test, I compiled the code in release, included symbols, forced a crash and was able to see where the fault was. My question more or less revolves around the SYMBOLS which tell you where the functions are located in the code, (PDB files). When you release a new version of your software, do you always BUILD these symbol files as part of the release configuration and tuck them away until you need them?? Our current process just bulids a simple RELEASE configuration with no map exports & no symbol building. Questions: 1) Do you build symbols/maps with your software during the RELEASE compile? 2) Is there any disadvantage to ALWAYS creating these files during the RELEASE compile? Is anything else included in the .EXE/DLLs which may assist in the wrong people trying to debug your application? 3) I'm assuming the version of the .exe and the .pdb have to be from the same compile, correct? Bottom line, what should I be doing as part of my RELEASE configuration to take full advantage of symbols/crash dumps etc. Sorry, I'm a little green here with this stuff... anything you can contribute would be greatly appreciated. Mke.

    C / C++ / MFC question announcement css debugging sales

  • Server Memory Management - large database.
    M Mike Doner

    Hi Mark, Thanks for your reply. We are using CreateFileMapping(), MapViewofFile() etc. We use this basically to give names to blocks of memory. We load each table off disk into blocks of memory managed by CreateFileMapping/VirtualAlloc. I guess the biggest problem is the addition of new objects to a table and the memory we reserve. Each table has a maximum number of objects... We reserve up to the maximum size required for that table and commit up to the number of active objects. When we reserve memory, its counted towards the 2g process limit. We reserve the bytes so that when a new object is added, we just need to commit "objectsize" at the end of the last committed bytes, we're not moving memory around or doing any further juggling. Is there something I'm overlooking with File mapping that might help us out? Thanks again for your reply.

    C / C++ / MFC database mysql sysadmin performance 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