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
D

De Nardis Andrea

@De Nardis Andrea
About
Posts
53
Topics
23
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • How to init this VARIANT?
    D De Nardis Andrea

    In my opinion Item can be used "as is" and has little to do with enumeration, so I think the variang parameter can be a string instead of a number. This can be a particularity in your object.

    COM c++ tutorial question

  • How to init this VARIANT?
    D De Nardis Andrea

    I'm not an expert with Enum. I found some info on MSDN, look for IEnumXXXX and IEnumUnknown. In the C++ client you have to call Reset (), Next () in order to enumerate all the items. Look at ALCCollection sample, and keyword _Copy, CComEnumOnSTL, ICollectionOnSTLImpl, CAdapt, IEnumVARIANT, std::map, std::string, std::vector Hope this helps. Regards, Andrea

    COM c++ tutorial question

  • How to init this VARIANT?
    D De Nardis Andrea

    Do you have access to the get_Item function? It is the only way to know the type. If I correctly undestand set Curfolder = Subfolders.Item(1) works, so it should work in C++ as well, with vtKey.ChangeType (VT_I2), vtKey.ChangeType (VT_I4), vtKey.ChangeType (VT_R4), or vtKey.ChangeType (VT_R8). You should also get the return code or some error info. Regards, Andrea

    COM c++ tutorial question

  • IActveScript and events of run-time object
    D De Nardis Andrea

    Hi all, I have a really difficult problem. I have an MFC application that hosts scripts via IActveScript engine. Inside the script I have created a COM object that exposes some events. The very same object is correctly used in a regular vbs scipt host by WSH: Dim obj Set obj = CreateObject ("cnitfc.myobj") wscript.ConnectObject obj, "myobj_" Sub myobj_Event (nParam) msgbox "event fired" End Sub and myobj_Eventis is invoked when myobj fires "Event" event. How to implement the very same "ConnectObject" method that is built-in into wscript object? Thanks a lot in advance. Regards, Andrea :^)

    COM c++ com tools help tutorial

  • Pre-allocation of virtual memory
    D De Nardis Andrea

    Hi, unfortunately I have to reserve a large amount of global virtual memory because virtual memory (either physical or in page file) is a shared, limited resource. The article about the heap should fit but I still do not undestand how to use STL::new and malloc without making custom allocation classes. So the problem is still open... regards, Andrea

    C / C++ / MFC css performance help question

  • Scipting
    D De Nardis Andrea

    Hi, please consider this article: [^] It rocks. Hope this helps, Andrea

    C / C++ / MFC c++ tools workspace

  • Pre-allocation of virtual memory
    D De Nardis Andrea

    Hi all, Is there a way to pre-allocate some large amount of virtual memory for a process and then let it use? I have the following problem: there is a very important service that use large amount of memory (up to 400MB and more) but its memory usage depends on time: sometime uses as low as 4MB of memory, sometimes 400MB. Sometimes it happens that it cannot find 400MB free because other less important processes uses it. A possible solution would be to pre-allocate 400MB, and then let 'malloc' and 'new' allocate from the pre-allocated pool. Do you know a way to do it in W2K/XP? Thanks a lot in advance. Regards, Andrea

    C / C++ / MFC css performance help question

  • VB crash
    D De Nardis Andrea

    Hi all, I have developed a ATL in-proc server (dll) that exposes some COM objects, and these have some events. I have to fire events in a separate working thread I spin when the library is loaded. So the event consumer is serviced in another thread. When I use this in a VB6.0 application all works well but if I attempt to debug the event, placing a breakpoint in the event sub, the breakpoint is hit, but then the VB IDE crashes and suddenly disappear. I registered the COM object apartment as BOTH. So what is the problem? Could you please help me? Many thanks and HAPPY NEW YEAR !!!! Regars, Andrea

    ATL / WTL / STL debugging help question c++

  • A problem w/ ATL web server - URGENT !!!
    D De Nardis Andrea

    Hi all, I have really big problem w/ my web servervice. I implemented the web server w/ ATL, so now I have a Cws ATL class that implements the web service and a CwsIsapi that implements the ISAPI extension. Then I am consuming this web service in C#. /////////////////////// ATL WEB SERVER ///////////////////////// class Cws { [soap_method] HRESULT init (/*[in]*/ int num) { m_mem = num; return S_OK; }; [soap_method] HRESULT get_number (/*[out]*/ int *val) { *val = num; return S_OK; } protected: int m_mem; }; /////////////////////////////// C# CONSUMER /////////////////////////////////////////// ... mymachine.Cws service = new mymachine.Cws (); service.init (3); int val; service.get_number (out val); if (val != 3) { //error: THIS ALWAIS HAPPEN } ... This code DOES NOT WORK !!! In fact when "service.get_number (out val)" is invoked, an instance of Cws is created then destroyed, so when "service.get_number (out val)" is invoked, the instance is different and m_mem is not initialized to 3 any more !!! Is there any way in order to change this behaviour? Any help will be appreciated. Thanx very much. Regards, Andrea

    ATL / WTL / STL help csharp c++ sysadmin question

  • ATL web service scope
    D De Nardis Andrea

    My ATL web server is continously loaded and unload. The ISAPI extension fortunately not. Why this happen? I would like to have my web server always loaded because loading it requires many CPU cycles. Could you please help me? Best Regards, Andrea

    ATL / WTL / STL c++ sysadmin help question

  • ATL in .NET Studio...
    D De Nardis Andrea

    I am not sure of the real meaning of the question, however, if you are trying to use an ATL com server in a ATL project you can use "smart pointers". Use #import directive in order to import the .tlb table then you can use these magic stuff. If you have a IFoo intf and Foo coclass: MYCOMLIB::IFoo m_foo; m_foo.CreateInstance (__uuidof (MYCOMLIB::Foo)/*, NULL, CLSCTX_INPROC_SERVER*/); m_foo->DoSomething (); Hope this helps. Regards, Andrea

    ATL / WTL / STL csharp question c++ data-structures tutorial

  • ATL web server and smart pointers
    D De Nardis Andrea

    Thanx a lot, I found the problem, and this could be interesting for you, too. My COM dll server was properly registered in a substituted volume (V:) that does not exists at Windows startup. For some reason this prevents the interface from being accessed in inetinfo processo. Placing my COM dll (ATL COM inproc server, by the way) in %windir%\system32 all works well. Thanks a lot for your help. Best Regards, Andrea ;)

    ATL / WTL / STL c++ com sysadmin help question

  • ATL web server and smart pointers
    D De Nardis Andrea

    Hi all, I need to access a COM object from my ATL web service. The COM object is propely registered in the target machine and can be freely accessed from a VB client. I am using smart pointer in order to create an instance. When I invoke _com_ptr_t::CreateIntance I get as HRESULT "class not registered". What was wrong? Please help me!!! best Regards, Andrea :)

    ATL / WTL / STL c++ com sysadmin help question

  • Web services and events
    D De Nardis Andrea

    Hi all, I am trying to convert an existing DCOM component into a web service. I personally find DCOM is great but is of poor interest in a firewall-dominated world. My good old objects have EVENTS, and I exploited them in order to prevent clients from polling the remote application status. Is there anything similar in web service? Did anyone meet the problem? Any help will be appreciated. Thanks a lot in advance. Best regards, Andrea :)

    ATL / WTL / STL help wcf question

  • Shutdown and restart
    D De Nardis Andrea

    Hi all, I have a service that handles SERVICE_CONTROL_SHUTDOWN so it is notified of the shutdown in progess. I need to distinguish between a restart and a shutdown. Is there a way to do so? Thanx in advance. Best regards, Andrea :)

    C / C++ / MFC question

  • limiting application disk space usage
    D De Nardis Andrea

    If the dir tree starts from a fixed root, try to iterate through the tree via ::FindFirstFile, ::FindNextFile, ::FindClose, check the disk quota, and if a new file would overcome the limit delete the oldest one. It's very easy to implement, and can optimized just caching the prev dimension and remembering some few old files in order to iterate only when needed. Hope this helps. Regards, Andrea

    C / C++ / MFC question

  • Be notified of the input focus
    D De Nardis Andrea

    Hi David, unfortunately it does not work. My dialog is a window inside a frame in a SDI application. I checked w/ Spy++ and it does not receive any WM_ACTIVATE msg. Have u got any idea? Sorry if I am annoying u w/ silly question. Thanx a lot. Bye, Andrea:)

    C / C++ / MFC help question

  • Be notified of the input focus
    D De Nardis Andrea

    Hi all, I have a dialog that have to do something when it gains the focus. The dialog is derived by CDialog and contains some controls. I tried w/ CWnd::OnKillFocus and CWnd::OnSetFocus but my overloaded funcs are never called. The func CWnd::OnLButtonDown works well but I also need to know when the dialog loses the input. Could you please help me? Thanx a lot. Best regards, Andrea :)

    C / C++ / MFC help question

  • Linker problems
    D De Nardis Andrea

    PRB: Error LNK2001: '_WinMain@16': Unresolved External Symbol Si applica a This article was previously published under Q125750 NOTE: Microsoft Visual C++ NET (2002) supported both the managed code model that is provided by the .NET Framework and the unmanaged native Windows code model. The information in this article applies to unmanaged Visual C++ code only. SYMPTOMS The linker generates the following error, when you build an MFC application with UNICODE support using the Microsoft products listed at the beginning of this article: msvcrt.lib(crtexew.obj) : error LNK2001: unresolved external symbol "_WinMain@16" Visual C++ .NET: error LNK2019: unresolved external symbol _WinMain@16 referenced in function _WinMainCRTStartup fatal error LNK1120: 1 unresolved externals CAUSE MFC UNICODE applications use wWinMainCRTStartup as the entry point. RESOLUTION In the Output category of the Link tab in the Project Settings dialog box, set the Entry Point Symbol to wWinMainCRTStartup. For Visual C++ .NET: In the Advanced category of the Linker folder in the Project Properties dialog box, set the Entry Point to wWinMainCRTStartup. STATUS This behavior is by design. REFERENCES The above information is documented in Books Online under this structure: - C/C++ - Programming Techniques - Chapter 12 Developing for International Markets - Support for Unicode - Unicode Programming: Summary This reference also lists the additional steps that you need to consider to take advantage of the MFC and C run-time support for Unicode. :)

    C / C++ / MFC question c++ help com debugging

  • Convert a MFC project in Automation
    D De Nardis Andrea

    Hi all, I need to add Automation features to my MFC app, and I did not include it when I started the project. How to add it now? I do not know much of automation, I only built some DLLs in ATL and they work fine, I need to do a work similar to the automation in MS Word (but orders of magnitude simpler). how can I accomplish it? Thanx in advance. Best Regards, Andrea :)

    C / C++ / MFC c++ question testing tools 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