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
B

Bogdan Apostol

@Bogdan Apostol
About
Posts
15
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Problem_With_MSVC6_Linker
    B Bogdan Apostol

    Sorry... that must be a typo, or a glitch when submitting a post (maybe interpreted as html code, 'cause I've used the xml kinda brackets)! :confused: I meant MFC applications cannot include windows.h... Very glad to hear that you solved your compilation issues. Congrats!

    Bornish ESRI Developer Network Compilers demystified - Function pointers in Visual Basic 6.0 Enables the use of function pointers in VB6 and shows how to embed native code in a VB application.

    C / C++ / MFC c++ visual-studio com help announcement

  • Redraw Child Windows in ActiveX Control
    B Bogdan Apostol

    Yes, you can use that email address. If you'd like you can simply send the location where I can find the open-source code for the control. I'll create a sample test project and try to reproduce the behaviour you've been describing. Regards,

    Bornish ESRI Developer Network Compilers demystified - Function pointers in Visual Basic 6.0 Enables the use of function pointers in VB6 and shows how to embed native code in a VB application.

    C / C++ / MFC com help c++ graphics game-dev

  • Redraw Child Windows in ActiveX Control
    B Bogdan Apostol

    Have you tried to see if other applications using DirectX overlay have a similar problem? Could be a graphics card / driver / driver settings problem. I could try the ActiveX control if you send me a copy and if it doesn't have some licensing issue. For now, I can't think of a specific reason for your problem. It would be much easier to try it myself. Best wishes,

    Bornish ESRI Developer Network Compilers demystified - Function pointers in Visual Basic 6.0 Enables the use of function pointers in VB6 and shows how to embed native code in a VB application.

    C / C++ / MFC com help c++ graphics game-dev

  • PostMessage
    B Bogdan Apostol

    Thanks David for the links... especially the second one! It is interesting to see different opinions about an "old new subject" such as message queueing. We might fight over nothing here, since I kinda agree with one of the conclusions mentioned in that discussion thread: it seems to be an implementation detail. Point taken regarding the non-queueing messages! Indeed, sent messages are different since are not stored as messages posted, and also not returned by GetMessage. My logic still says that they are "somehow" queued... and how is indeed "an implementation" detail. All this confusion is set by MSDN, which is not comprehensive on the subject, and also contradicting itself in the documentation of GetQueueStatus()[^], when describing QS_SENDMESSAGE. As you well described, sent messages are different then posted ones, having higher priority, and still being queued (maybe separately, or could be inserted ahead of the posted ones) because they can't be processed by receiving thread "immediately" (as MSDN is misleading us). Please have a look at "The Algorithm for Extracting Messages from a Thread's Queue" section at "Waking a Thread[^]" sub-chapter from a book called "Programming Applications for MS Windows, 4th edition" by Jeffrey Richter, and tell me if you agreed with what says there... at least partially. It was published by Microsoft Press[^]! Thanks,

    Bornish ESRI Developer Network Compilers demystified - Function pointers in Visual Basic 6.0 Enables the use of function pointers in VB6 and shows how to embed native code in a VB application.

    C / C++ / MFC question data-structures

  • Redraw Child Windows in ActiveX Control
    B Bogdan Apostol

    Is the ActiveX control written by you? My first try would be to disable the erase background and paint events in the MFC dialog, and see if the control draws properly... even that your MFC dialog will look horrible. If the problem was that your dialog ruins the video playing, then you can try to set the flag for clip children (not clip siblings). Can you tell us if the ActiveX control is using DirectX overlay for playing video? Regards,

    Bornish ESRI Developer Network Compilers demystified - Function pointers in Visual Basic 6.0 Enables the use of function pointers in VB6 and shows how to embed native code in a VB application.

    C / C++ / MFC com help c++ graphics game-dev

  • PostMessage
    B Bogdan Apostol

    David, in my opinion, your interpretation does not make any sense. Why? Because when SendMessage is used across thread boundaries, it cannot be processed in the sender's thread, thus... must be queued, and processed by the receiving window's thread, whenever it is reached. That's why SendMessage may hang if the receiver thread (other than sending one) is busy... not processing queued messages. If fact, I can tell you from experience that it happen once to redraw a window, but to return the wrong value from the window procedure, thus the paint message was not removed from the queue. In that case, any other thread using SendMessage to communicate with this window was blocked, not only the thread that created the window. Your explaination with a secondary FIFO doesn't hold, because a thread's context can't change "suddenly". If there is a message queue (also FIFO) which GetMessage() and PeekMessage() are using, when and how a secondary FIFO can be processed? No OS would suspend a thread's execution while processing a message from the queue, or even while waiting for a new message, and "suddenly" call a window procedure with a message sent through SendMessage! Remember, I'm not talking here about sending a message to a window belonging to the same thread where the call is made. Indeed, when the window belongs to the same thread, it makes perfect sense to call the window procedure immediatelly, because the developer would expect that SendMessage() returns only after the message is processed, so... the thread execution depends on the processing of that message, before any other message already existing in the queue at that point in time. I don't even understand why MSDN says that such behaviour is for "Vista or later", because, when I think about it,... it cannot be otherwise. Regards,

    Bornish ESRI Developer Network Compilers demystified - Function pointers in Visual Basic 6.0 Enables the use of function pointers in VB6 and shows how to embed native code in a VB application.

    C / C++ / MFC question data-structures

  • WM_COPYDATA message
    B Bogdan Apostol

    Hmm,... reading a few times what MSDN, I understood that you cannot return data in the buffer given by the sending application... but, since I've never tried myself, I would consider David's interpretation. Have already found some sample code on CP using such technique to share memory... 2 ways. Well, it wouldn't be the first time when MSDN is missleading! Still, the opinions found are divided almost 50-50. If you're planning to try it out, please let us know about your findings. It would be great if you can try it out on different OS versions. While searching more info about it, I came across an interesting aspect: http://www.flounder.com/wm_copydata.htm[^] Hope you'll find this idea useful, and couldn't hurt using a GUID as explained there. Best wishes,

    Bornish ESRI Developer Network Compilers demystified - Function pointers in Visual Basic 6.0 Enables the use of function pointers in VB6 and shows how to embed native code in a VB application.

    C / C++ / MFC performance question

  • Launch myprogram with another at same time
    B Bogdan Apostol

    Yes, there is a way. You may not like it though! :laugh: You can patch notes.exe, such as to modify the entrypoint to a different location, which, obviously, launches your application and then forwards the execution to the original entrypoint of notes.exe! That's how some viruses work, isn't it? ;P Cheers,

    Bornish ESRI Developer Network Compilers demystified - Function pointers in Visual Basic 6.0 Enables the use of function pointers in VB6 and shows how to embed native code in a VB application.

    Visual Basic question

  • Problem_With_MSVC6_Linker
    B Bogdan Apostol

    MFC applications cannot include ! Why don't you compile your matrix library with the same dependency as the MFC project that needs to use it? Anyway, the conflict occurs between libcmt.lib and msvcrt.lib, thus you can try removing one of them and keep the other... see which one (we can't 'cause don't have the source code). Regards,

    Bornish ESRI Developer Network Compilers demystified - Function pointers in Visual Basic 6.0 Enables the use of function pointers in VB6 and shows how to embed native code in a VB application.

    C / C++ / MFC c++ visual-studio com help announcement

  • WM_COPYDATA message
    B Bogdan Apostol

    When sending WM_COPYDATA message to another application, lParam must point to a COPYDATASTRUCT, and the passed data must not contain any addresses (pointers or references) that would not be available in the other process. Until the thread sending the message returns from the call, the data structure should be either locked or not modified by other threads of the calling process. The data received by the other process cannot modify / return any of the structure's content. The reason behind all these is that the OS is copying the given structure as a block, from the calling process to the receiving process. It is like calling WriteProcessMemory, on some temp variable (thread stack address) in the target process. The communication is one way! Regards,

    Bornish ESRI Developer Network Compilers demystified - Function pointers in Visual Basic 6.0 Enables the use of function pointers in VB6 and shows how to embed native code in a VB application.

    C / C++ / MFC performance question

  • Get exact memory usage of a process.
    B Bogdan Apostol

    When you allocate 128 bytes through "new char[128]", you may not commit any new page of memory!!! My point is that memory allocation is done by the heap manager used by your module. For example, if CRT is the heap manager (msvcrt.dll) you're linking with, all "malloc / new" kind of instructions will be handled by that library, which may reuse previously released memory, or return an address of already commited memory. The heap manager keeps track of your allocations, and commits pages of memory only when needed. For example, on first allocation, a number of pages are commited to support the request. On those pages there's still room for more allocations. Thus, next allocation, if small enough, will not commit more pages, but use the existing commited pages. There're plenty of online resources explaining how a "heap manager" implementation works: http://blogs.technet.com/askperf/archive/2007/06/26/what-a-heap-of-part-one.aspx[^] http://en.wikipedia.org/wiki/Chunking_(computing)[^] http://www.blackhat.com/presentations/bh-usa-06/BH-US-06-Marinescu.pdf[^] http://www.freshpatents.com/Methods-systems-and-computer-program-products-for-managing-a-memory-by-storing-external-objects-in-a-dynamic-heap-dt20051215ptan20050278496.php[^] Best regards,

    Bornish ESRI Developer Network Compilers demystified - Function pointers in Visual Basic 6.0 En

    C / C++ / MFC performance question

  • PostMessage
    B Bogdan Apostol

    In addition to what Michael posted, both APIs are adding messages to the thread's message queue, thus can be retrieved using GetMessage() and PeekMessage(). As MSDN says, on Vista there's a small exception for this behaviour: "Microsoft Windows Vista and later. ... If the specified window was created by the calling thread, the window procedure is called immediately as a subroutine. ..." Best regards,

    Bornish ESRI Developer Network Compilers demystified - Function pointers in Visual Basic 6.0 Enables the use of function pointers in VB6 and shows how to embed native code in a VB application.

    C / C++ / MFC question data-structures

  • Prevent App from be launched more than once
    B Bogdan Apostol

    Did you try creating a mutex? As far as I know, that is the general solution to such problem, and can be used in any language, since is supported by the OS through APIs. If CreateMutex() returns ERROR_ALREADY_EXISTS means there's an already running instance of your application. Regards,

    Bornish ESRI Developer Network Compilers demystified - Function pointers in Visual Basic 6.0 Enables the use of function pointers in VB6 and shows how to embed native code in a VB application.

    Visual Basic csharp help question

  • CMOS camera help needed.....urgent
    B Bogdan Apostol

    ...more like line 1098... :laugh: Did anyone noticed that a "used formula" is missing in the text? Thus... how can we understand some copy / pasted material... and why would anyone do someone else's job for which is probably paid? Helping lazy students do their homework is not as nearly as stupid as helping ____ (fill the blank with whatever you find appropriate) to earn good money and even promote, based on work they didn't even read before submitting. :mad: PS: Btw, I would consider such material as confidential as expect to be sued instantly for publishing it.

    Bornish

    Hardware & Devices performance hardware graphics adobe iot

  • at least he tried
    B Bogdan Apostol

    MSVC++ generates an error on the above code.;) // why not having then: int Primes[]={2,3,5,7,...};:rolleyes:

    Bornish

    The Weird and The Wonderful question
  • Login

  • Don't have an account? Register

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