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
P

Pros Chum

@Pros Chum
About
Posts
8
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Earning some cash from web design
    P Pros Chum

    The first thing to do is to get your site up with examples of your web design work. Then refer potential clients to your site(s) if they're interested to examples of what you've done. Many of the jobs that I've *gotten* were the result of the potential client being impressed with seeing something that I accomplished before they hired me. The hardest part is getting the first few customers. They're also the most important customers that you'll have since they can possibly recommend you to somebody else that is looking for someone to do that type of work. Once you get the ball rolling it's pretty easy after that if you keep up with your contacts and networking. Attend business conferences and events, work the room schmoozing with everyone at parties, let your friends, family members, and neighbors know, etc. You could also try sites like eLance.com and try bidding on a project, but usually the bidding war between contractors results in the winner being paid slave wages. But if you're just starting out then sometimes it's best to work for low wages initially until you get some experience under your belt. As for the legal stuff, make sure you write a contract that specifies the requirements as exactly as possible, otherwise you'll be doing more work than necessary; especially if you're not doing it under time and materials and instead as a fixed-price project. If you're not really familiar with the legal stuff then hire a lawyer and a CPA to set things up. It'll save time and headaches in the long run. Good luck! Pros

    The Lounge design business question

  • A window into a big world
    P Pros Chum

    >> 1/ If you're writing a game, you'll want to use DirectX, not just GDI/MFC. OpenGL is another option also. For simple things, OpenGL is easier to pick up than DirectX. But if you're in it for the long run, DirectX will offer more flexibility at the expense of a high learning curve. - Pros

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

  • transfer block-memory in com ,why only a byte
    P Pros Chum

    This is just a guess since I'm a COM newbie, but if you created your ATL object with a "dual" interface then the above IDL won't work. You'll need to either use a VARIANT safearray to pass the data in, or create your object with a "custom" interface when you're on the ATL object wizard dialog. Hope that helps, Pros :)

    COM com sysadmin performance question

  • Ref cnt > 0 for COM server
    P Pros Chum

    I figured it out. I had some worker threads in my COM server in which I was marshalling an interface pointer to itself, and had forgotten to call Release().

    COM com c++ database sysadmin debugging

  • Ref cnt > 0 for COM server
    P Pros Chum

    Also, when I startup and shutdown the client, the reference count that is returned via the ATL header debug interface traces always returns 1 after the client shutsdown and doesn't increase like the unlock count returned from CComModule::Unlock() which increases by 1 each time.:confused:

    COM com c++ database sysadmin debugging

  • Ref cnt > 0 for COM server
    P Pros Chum

    I have a free threaded out-of-process COM server that after the clients release the interface the COM server's CComModule::Unlock() returns a value > 0. After the client first releases, the return value of Unlock() is 1, after the client loads and releases the second time the value is 2, and this continues to increase by one as I startup and shutdown the client. The client is using a smart pointer to the COM server interface. I also detached, the interface from the smart pointer in the destructor of my application and displayed the return value of Release() which is always 0. So it seems the client is releasing everything properly, it's just that the server isn't maintaining ref. count correctly for some reason. This causes the COM server to never shutdown. Any ideas why it keeps on increasing? I turned on ATL debugging and came out with the following output in the trace window. I also display the return of Unlock() for the lines that begin with "Unlock count: X". 1> CComClassFactory - IUnknown CComClassFactory - IUnknown Loaded 'C:\WINDOWS\SYSTEM\RPCRT4.DLL', no matching symbolic information found. 2> CComClassFactory - IUnknown 1< CComClassFactory - IUnknown 1> CComClassFactory - IClassFactory CComClassFactory - IClassFactory 1> CNREmail - IUnknown CNREmail - IUnknown 2> CNREmail - IUnknown CNREmail - IMarshal - failed CNREmail - {0000001B-0000-0000-C000-000000000046} - failed 3> CNREmail - IUnknown CNREmail - IUnknown 4> CNREmail - IUnknown CNREmail - IStdMarshalInfo - failed CNREmail - IExternalConnection - failed 3< CNREmail - IUnknown Unlock count: 3 1> CNREmail - INREmail CNREmail - INREmail Loaded '[My app's Proxy server].dll', no matching symbolic information found. 1> CNREmail - INREmail CNREmail - INREmail 2< CNREmail - IUnknown Unlock count: 4 1< CNREmail - IUnknown Unlock count: 3 0< CComClassFactory - IClassFactory Loaded 'C:\WINDOWS\SYSTEM\MSVCRT.DLL', no matching symbolic information found. Loaded 'C:\Program Files\Common Files\SYSTEM\ADO\msado15.dll', no matching symbolic information found. Loaded 'C:\Program Files\Common Files\SYSTEM\ole db\oledb32.dll', no matching symbolic information found. Loaded 'C:\Program Files\Common Files\SYSTEM\ole db\oledb32a.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\SYSTEM\msjint40.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\SYSTEM\msjter40.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\SYSTEM\mswstr10.dll', no matching symbolic information found. Loaded 'C:\WINDO

    COM com c++ database sysadmin debugging

  • create the com-object from the exe-server
    P Pros Chum

    If selected to create a custom interface, you'll need to register the proxy server marshalling dll for your EXE COM server. Look at the file with the WinMain(), Unlock(), and Monitor() functions that SCM uses to startup your COM server. At the top of the file you'll see some comments that look like this: // Note: Proxy/Stub Information // To build a separate proxy/stub DLL, // run nmake -f [Your EXE name here]ps.mk in the project directory. Just do what it says. (NOTE: You may need to run vcvars32.bat in your VC directory to setup the paths to nmake and stuff.) After doing that you should have a proxy/server marshalling DLL file. You'll also need to register the DLL: regsvr32 [The newly created proxy/server]ps.dll A way to automate this is to put it in your Project | Settings under the "Post-Build Step": nmake /f MyComponent.mk regsvr32 /c /s MyComponenetps.dll - Pros

    COM question c++ com sysadmin

  • Returning an array of strings
    P Pros Chum

    How do I return an array of strings in IDL and COM? E.g. I would like a function that does something like this: struct StringListType { long m_lNumStrings; [string, size_is(lNumStrings)] wchar_t ** pStrings; // Is this correct??? }; void GetStrings( [out] struct StringListType * pStringList ) { wchar_t Str1[] = "A silly string!"; wchar_t Str2[] = "You're da bomb :)"; // What goes here to put Str1 and Str2 into pStringList??? } I know I have to do some TaskMemAlloc() but am not sure of the correct way to do it. Also, I'm not sure of the proper way to specify an array of strings in the IDL above. Thanxs for any help! ;)

    COM question com data-structures 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