Forgot your password?
Sign in with
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Python questions
View Java questions
All Message Boards...
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Design and Architecture
Internet of Things
C / C++ / MFC
ATL / WTL / STL
Objective-C and Swift
Hardware & Devices
Hosting and Servers
.NET (Core and Framework)
Site Bugs / Suggestions
Spam and Abuse Watch
The Insider Newsletter
The Daily Build Newsletter
Most Valuable Professionals
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
What is 'CodeProject'?
Ask a Question
Bugs and Suggestions
Article Help Forum
Comments by SMD111 (Top 10 by date)
>>It is not related to Windows API.
I use API function calls only, that is what I meant.
>>There is nothing supporting PDF in Windows.
I perfectly understand what you mean.
>>You need some 3rd-party code.
Exactly! I need 3-rd party code in the form of a DLL but cannot find one, only ActiveX...
I just love it how you used the word "us"!
Anyway, in other words, if you know the answer, it would be nice to offer it. But if you don't know the answer (what is the clear case with you here), why bother to waste electricity and contaminate somebody's post with verbal garbage?
I thought this forum existed for people to be able to get a useful advise, not useless smart-ass remarks.
I'll be patient.
All information I am seeing on the topic can be divided into the following categories:
1) Using .NET, C# and the likes... I specified pure WinAPI in my question.
2) Using separate PDF converter/creator applications and ShellExecute() calls to those applications from C code. Cheap.
3) Using ActiveX libraries. I have never used those with C projects and don't see reliable tools to extract their functionality into a DLL.
I am doing that now.
Good idea, thank you. I coded it today and it works.
In case it helps somebody, I am putting a snapshot of the code in the "solutions" section.
It is not a good approach but the last resort. In my original post I indicated that the problem originates in the SDK that comes with the hardware device I am using. I have no control over that code. Instead, I have a very bad experience arguing with that company about undocumented behavior of their software in my previous projects.
One must check the return value of GetModuleBaseName() function because it often returned zero in my case. I also found that the technique described above only retrieves a list of 32-bit processes (the ones that appear as "name.exe *32" in the Task Manager).
Thanks, I do get a list of processes using calls to EnumProcesses(), OpenProcess() and GetModuleBaseName() functions.
However, using this method I get at least 50 processes named Ä, and then pairs like these:
Something is not working here.
Thanks again, I've been reading a lot on MSDN. To clarify my question, I'll use two citations from there:
"A simple message loop consists of one function call to each of these three functions: GetMessage, TranslateMessage, and DispatchMessage."
"An application's main thread starts its message loop after initializing the application and creating at least one window. After it is started, the message loop continues to retrieve messages from the thread's message queue and to dispatch them to the appropriate windows."
So, what is retrieving and dispatching messages in the absence of the message loop, like in my example above?
Thank you, Albert. I thus understand that in this case the GetMessage() -> DispatchMessage() loop is only a hook in the main thread used to catch WM_QUIT and make WinMain() return?
Last Updated 1 Jan 1900
All Rights Reserved.