Click here to Skip to main content
15,395,859 members

Comments by Jochen Arndt (Top 200 by date)

Jochen Arndt 3-Oct-18 4:22am View
You are welcome and thank you for accepting my solution.
Jochen Arndt 3-Oct-18 4:17am View
p is initialised by the strtol() function.
Jochen Arndt 3-Oct-18 4:11am View
A base of zero is special and allows input as hex, octal, and decimal:

From the strtol man page:

If base is zero or 16, the string may then include a "0x" prefix, and the number will be read in base 16; otherwise, a zero base is taken as 10 (decimal) unless the next character is '0', in which case it is taken as 8 (octal).
Jochen Arndt 1-Oct-18 6:13am View
I don't know that control. You have to check the documentation if there is a similar function. If not, you have to implement it yourself using the metrics of the used font.
Jochen Arndt 25-Sep-18 7:11am View
You have to get the character position (buffer offset) from the mouse position. This requires knowing the page and line offsets when scrolled, the line height, and the character width (with fixed width fonts). With proportional fonts it is more complicated but there are Windows API functions for such calculations. The keyword is "text metrics".
Jochen Arndt 19-Sep-18 12:10pm View
There is no need to clear bits when using a variable initialised to zero as shown by Richard. Then you would have to set bits only.

But there is a much simpler solution: Using XOR.
Jochen Arndt 18-Sep-18 4:05am View
Then your web page is not properly configured for Unicode. When viewing the HTML source of the page in a browser (with Firefox for example use Ctrl+U), there should be a
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
tag in the header.

If that is present, there may be also wrong conversions somewhere in your server code.
Jochen Arndt 18-Sep-18 3:58am View
That means that one ore more required libraries are missing. The required libraries (called dependencies) are usually listed in the documentation.
Jochen Arndt 17-Sep-18 12:33pm View
As I wrote:
By installing the correct libraries. If they are provided for your platform (OS type / version and CPU) you can use those. Otherwise you have to build them from the sources.
Jochen Arndt 17-Sep-18 3:23am View
Then you did not have a library file build for your OS / version or the file has been corrupted.

GLU libraries are provided by Linux distributions. Ask Google using your distribution name to know how to install them or check if they are already installed.
Jochen Arndt 16-Sep-18 4:07am View
You get them by installing the package that contains these libraries if there is one for the Linux distribution used by you.

If not you have to download the sources and build them yourself. How to do that is usually described in the project documentation like at

Jochen Arndt 10-Sep-18 5:36am View
It depends on the type of the control from where you want to select the text.

Most controls support such already when the Shift key is down while dragging.
Jochen Arndt 4-Sep-18 3:31am View
Be careful with WM_MOUSEMOVE handlers. They are called repeatedly with each mouse movement and should therefore not perform time consuming tasks.

If you are actually testing it with a Debug build, try a release build. That might be much faster.

For further help you should show us the relevant code.
Jochen Arndt 2-Sep-18 5:09am View
Should be similar with the build tools. The build tools are nothing else than the platform toolset(s) installed with VS. So the vcvars.bat files should be somewhere installed.

Check also your start menu. As far as I know the installer will create shortcuts to "open developer command prompt windows by using these batch files, so all the required environment variables are set and ready to use".
Jochen Arndt 1-Sep-18 5:25am View
Then you have to write an outer loop around my solution. I will update it.
Jochen Arndt 1-Sep-18 5:23am View
The elements of a string are characters. If you want to process those you have to iterate over the string elements.

If the string contains a list of integers separated by specific delimiters, you have to split (tokenize) the string and convert each item to int.
Jochen Arndt 1-Sep-18 5:02am View
That can be only answered when knowing the file structure which I don't know.

My solution is for
- one header, contains info about # of following records
- 1. recordset
- 2. recordset
- ...
- # of recordsets - 1 recordset

If the file structure is different, you have to tell us the structure.
Jochen Arndt 31-Aug-18 14:49pm View
I don't get you.
If the file structure is as assumed in my solution, you have a header and recordsets. Then you access the header first at offset zero and then the recordsets at their matching offset.
Jochen Arndt 31-Aug-18 12:44pm View
As in my solution:
The third parameter specifies the offset into the data.
So that has to been set accordingly (size of header for first record and then incremented by the size of the record).
Jochen Arndt 31-Aug-18 12:42pm View
C = 1 byte, S = 2 byte, L = 4 byte, I = depends, Q = 8 bytes, f = 4 bytes (single precision)
Jochen Arndt 31-Aug-18 11:24am View
Your recordset has actually a size of 28 and the header of 12 with one byte for the time field. A time stamp might have 4 or 8 bytes making it a total of 15 or 19.
Jochen Arndt 31-Aug-18 7:51am View
I have omitted the begin and end markers. I just provided the plain matching parts because I have no information which regex engine and method is used. That depends also on the used programming language which might provide functions that already check the whole string.

Try this:
Jochen Arndt 31-Aug-18 7:41am View
That was not quite clear for me because the provided format strings did not match the DBF structures.

But my solution still shows how to iterate adjusting the offset as necessary.

More important then:
It seems that he used the DBF data type characters in his PHP unpack format strings instead of using the corresponding PHP identifiers.
Jochen Arndt 31-Aug-18 2:58am View
The shown code does not select a date in the picker. It only sets the range.

If you set the range that way when the user selects the year 2014, he can't select 2016 afterwards because that is out of the range.

Define first what the user can enter (the type of controls and what they contain) and what should happen with the entered data (get data and process them) on specific actions (controls changed and buttons activated). Once that is done you can think on how it can be implemented by code.

For me it looks like you are trying to do it the other way round:
Writing code without knowing what should be done.

I still don't know what you finally want to do. If you for example want to have a range of one year beginning at a start date, just use a datepicker without any adjustments. Once the user clicks the OK button, get the date and add one year in days to get the end date. If required, this can be then used in another picker to allow only selection within this range.
Jochen Arndt 30-Aug-18 9:10am View
You can execute the command line utility passing the input from a file like
sqlplus -s user/pass @script.sql
You might also put the above into a batch file. The login parameters can be also stored on top of the script file. Because at least one file would show your username and password, it should have restricted access.

If you want to use .Net, you can also execute the above using ShellExecute.
Jochen Arndt 30-Aug-18 8:48am View
See my updated answer.
The error occurs because the SPOOL command is not supported with the OracleConnection interface.
Jochen Arndt 30-Aug-18 7:08am View
If you define a string (an array of characters), it must be large enough to hold the entered data plus one for the terminating NULL that is placed at the end when reading with "%s". If more characters are read, an array overflow occurs which results in a memory corruption (stack memory here because the array is on the stack).

Ensure that the array is large enough and tell scanf() about the actual size. Example:
char str[16];
scanf("%15s", str);
Jochen Arndt 30-Aug-18 6:48am View
"my query result set;"
is not a valid SQL statement. If that is just a placeholder, check the actually used command or show it here.

Note also that the SPOOL command is not terminated with a semicolon.
Jochen Arndt 30-Aug-18 6:26am View
When you enter "a b c" it has 5 characters but you have specified that only 3 should be there. So only the first 3 are processed and the space is an unknown one.

There are multiple solutions depending on what you want to do:
- Read the input as string and process that
- Use getchar() to read a single character
- Optionally ignore spaces

Note also that there is the function isalnum() defined in ctype.h (std::isalnum() in ccytpe for C++).
Jochen Arndt 30-Aug-18 6:10am View
It should work even with modeless dialogs. But the dialog must be the active window (one of the dialog's controls has the focus) to receive keyboard input.
Jochen Arndt 30-Aug-18 4:56am View
From my point of view (I have not executed it), it is doing that. But with Qt5 you should use QString::simplified().

Because you have also lines containing not five floats, these must be skipped / ignored. But the following code does that.

If you don't know how it is working, print the intermediate results as suggested or inspect them with the debugger, and read and understand the documentation of the used functions.
Jochen Arndt 30-Aug-18 4:28am View
I mean what is read and what is expected.

Your file contains empty lines and lines containing not five floating point values. For those lines the splitted count might have of course different values. And the code checks if the words are floating point values.

My suggestion to report an error when the line count is not five was based on the assumption that the file contains only "valid" lines. Just not report that and all should be fine.

So what is your problem now?
From my point of view it should work as expected. That is: The data are appended to triangels.

Jochen Arndt 30-Aug-18 3:36am View
I don't have your file so that I did not know what it is.

So either you are able to find the problem by inspecting the output (should be obvious when it is not splitted into 5 parts as expected) or post it here.
Jochen Arndt 30-Aug-18 3:23am View
What is the input line?
What is the line count for that line?
What is in the splitted strings?
Jochen Arndt 30-Aug-18 3:05am View
By just reading it here it looks fine provided that the file content is in the expected format.

Split it into single function calls and inspect the content:
QString curLine = ts.readLine();
qDebug << curLine;
curLine = curLine.simplified();
qDebug << curLine;
QStringList line = curLine.split(' ');
for (int i = 0; i < line.count(); i++)
 qDebug << line[i];
Jochen Arndt 29-Aug-18 8:23am View
If the error occurs in the code from the updated question, use a try catch block around GCon.Open() and report the full exception message to get more details about what happened.

But because your message does not seem to be a system error message, it might also occur in code not shown yet.
Jochen Arndt 29-Aug-18 8:15am View
Assuming you have a dialog containing the picker:

- Upon creation of the dialog, set the limits. I can't help with that because I don't know them.

- In the OK button handler read the current value. Check the value optionally (usually not necessary).

To give more help I have to know what you finally want: what kind of dates the user can set, where the control is located (like a dialog), and how end of user input is signaled (e.g. an OK / Apply button).

All the above are design steps which have to be done before writing any line of code.
Jochen Arndt 29-Aug-18 7:58am View
Please show the relevant code lines. The error message looks like one generated by your application. So you should be able to locate the relevant code.

If so, you have already some kind of error check. Then get the error code and/or description too and append it to your error message string. Those contain much more details and help solving the problem.

Please use the green 'Improve question' link to add this information. Without that, it is impossible to help.
Jochen Arndt 29-Aug-18 7:53am View
I still don't understand.

A user can select any date within the limit and change his selection until the control is closed. It just depends on when your code reads the current selection. When the control is part of a dialog, that is usually done in the OK button handler.

You are using actually the ValueChanged handler of the picker control. That is not the right place to read the selection because you don't know if it is the final value.
Jochen Arndt 29-Aug-18 7:12am View
What do you mean by "all years"?
A datetime picker allows selecting a single datetime only. An int variable like 'year' can also hold only a single value. If you need a range, use two variables / controls.

The MinDate and MaxDate members are limiting the allowed input range for that single date. If that is what you want, set them accordingly.
Jochen Arndt 29-Aug-18 6:50am View
You need that specification if it is not a standard storage card (which can be used as any other drive once mounted by the operating system).

A smart card is accessed using ADPU commands. The libraries from my solution provide functions to send such commands and receive. But you have to know the ADPU command set used by your specific card.

I can't help with that because I don't know your card.
Jochen Arndt 29-Aug-18 6:23am View
That line gets the actually selected year from the control. If you have not set that from your code, the picker will be initialised with the current date upon creation.

It is unclear to me what you finally want to achieve. If you want the user to specify a date range, you have to use two controls:
One for the start date and one for the end date.
Jochen Arndt 29-Aug-18 6:13am View
You have to get the specifications of the smart card. It does not care which reader is used.
Jochen Arndt 29-Aug-18 5:20am View
Uups. The "Error" string parameter belongs to the message box. Fixed.

What does "was not loaded" mean.
Is the file opened?
If not, it should be catched and reported by my solution.
If yes, it is related to processing the file content. If the file does not contain lines with 5 space separated floating point values, nothing will happen. You can check that by reporting this (when line.count() != 5) or debugging the application (inspecting values when stepping through the code or printing the values using QDebug).
Jochen Arndt 28-Aug-18 9:10am View
Why do you check pTableDef twice?

The creation can only fail when out of memory which raises an exception. So pTableDef is never NULL when executing the shown code.

Maybe the second check should be something else like checking if the property exists or not?
Jochen Arndt 28-Aug-18 7:24am View
If you have a look at the WinUSB example code you will notice that CreateFile() is used too initially.

Have you ever used libusb? It is low level and hard as well :)
Jochen Arndt 28-Aug-18 7:04am View
What is the problem?
You have access to the right view instance via the document and can call therefore any member functions. With views you can override OnUpdate() and act according to the passed arguments (e.g. passing a pointer to the string in the pHint parameter).
Jochen Arndt 28-Aug-18 5:37am View
Then you made something wrong. But without seeing the relevant code (including the creation of the control) it is impossible to help.

The code of the CP article Using the CStatic control shows how it can be done with dialog template defined controls.
Jochen Arndt 28-Aug-18 4:18am View
To get help you have to show the actually used code and the header file.

Have you linked the library meanwhile and derived your class?
Then there is no need to use nm. All required information is in the header file.
Jochen Arndt 28-Aug-18 2:56am View
At first you have to know which encoding is used by the service (send via network) but UTF-8 is common. Then you have to convert that to a Java String which is UTF-16 internally. UTF-8 is supported by Java. If it does not work, it might be also sourced in your receiving code.

What you are receiving are bytes. Always. The meaning of the bytes is defined by the used protocol. With SSH it is text which is usually UTF-8 encoded. If you need to process that with Java as string, you have to convert it to a Java String as shown in my solution using the encoding used by the server.
Jochen Arndt 27-Aug-18 10:47am View
The linksd are meant to show how it can be done. If you have problems, try at the source first; e.g. using the forum at the CP article.

Note that I don't have access to your system. So I can't help without knowing what you have tried (I did not even know which of the sources you are trying to use).
Jochen Arndt 27-Aug-18 9:32am View
Any errors or exceptions?

Note also that not all OCR libraries support hand written text and IronOcr seems to be one of them.
Jochen Arndt 27-Aug-18 8:28am View
That is not a linking related problem. Pure virtual functions must be implemented in derived classes.

If all functions are pure virtual it would even make no sense to put the class into a library. Then the only code stored in the library would be the common operations if provided (e.g. constructor, destructor, copy, move). But such can be also placed in the header file; and they are usually with abstract classes.
Jochen Arndt 27-Aug-18 8:15am View
When using the -l option (small letter L), the "lib" prefix and the extension must be omitted and the library must have a matching name.

If the name of the library is, use one of these:
where the first two require the library to be located in one of the directories searched for libraries (defined by the -L option or the LD_LIBRARY_PATH environment variable for shared libraries).
Jochen Arndt 27-Aug-18 7:59am View
Then it might be due to how the class is implemented in the library. The syntax from your example requires that dlsym() called with a class name returns a newly allocated instance of the object.

See also Dynamic Class Loading for C++ on Linux.
Jochen Arndt 27-Aug-18 4:27am View
It is not a problem of the latest version. It is a problem of getting a version (library) that has hardware acceleration enabled for the used encoding(s) which might require building it yourself.
Jochen Arndt 27-Aug-18 2:50am View
You have to implement it in your sendCommand() function using the byte buffer instead of the StringBuilder.
Jochen Arndt 25-Aug-18 10:38am View
Then that decoder is not supported by your ffmpeg version.
Jochen Arndt 24-Aug-18 9:55am View
The common scenario would be showing the dialog from InitInstance() before creating and showing the main frame. If the dialog does not return IDOK, return from InitInstance() with FALSE to terminate the application.

Your shown code does not make really sense. Such a login dialog usually has and input field and OK and Cancel buttons. Override the default OK handler. Within the handler perform the check by reading the text of the input field. If that is valid call CDialog::OnOK() and return. Otherwise just return without calling CDialog::OnOK() or optionally (e.g. after a specific number of attempts) call CDialog::OnCancel().
Jochen Arndt 24-Aug-18 8:15am View
You just have to do it similar as shown in my solution and (I forgot) to use the appropriate constants instead of the C# escape sequences:
vbCr.Equals(_strBuffer(nIgnore)) OrElse vbLf.Equals(_strBuffer(nIgnore))
Jochen Arndt 24-Aug-18 6:42am View
The problem is sourced in your sendCommand function() because that does not return a valid (UTF-16 encoded) Java string.

I will write an answer.
Jochen Arndt 24-Aug-18 6:27am View
And what happens if you log the result as it is without applying any conversion?
Jochen Arndt 24-Aug-18 6:20am View
First hit for "c# is null vs == null":

The straight forward answer is in that thread:
There is no difference for this special case (checking for null).
Jochen Arndt 24-Aug-18 6:06am View
The character constants has to be enclosed by double quotes.

Because it are again comparisons, using Equals() instead of the "=" operator is recommended.
Jochen Arndt 24-Aug-18 5:48am View
I don't get it why you want to convert a Unicode string to a multi byte string using a specific code page. This should be only necessary if you have to pass it with that specific code page. But all you are doing is passing it to a logger. That will usually convert the input to the encoding used internally by the logger which is very probable Unicode.

A different scenario would be having a multi byte string with a specific encoding as input. Then convert that to Unicode for further processing.

If you are converting a Unicode string to a non Unicode code page / CCSID, all characters not supported by that code page are lost.
Jochen Arndt 24-Aug-18 5:01am View
Fine and thank you for accepting my solution.
Jochen Arndt 24-Aug-18 4:49am View
Should be
For i As Integer = 0 To DiffArray.Count - 1
For i As Integer = 0 To LongArray.Count - 2

Countered the 1 vote anyway.
Jochen Arndt 24-Aug-18 2:50am View
Please don't repost.
You have already asked this at

If you want to add new information, edit your existing question using the green 'Improve question' link.
Jochen Arndt 24-Aug-18 2:46am View
And that is working?
It is not much different than my solution but more complicated.
Note the "%%~nxf" from my solution which gets the name and extension from the full path in %%f.

The problem might be with assigning that to a variable. Then use it like in your example (enable delayed extension and use !fname!) or just avoid using a local variable.

You did not told us that the destination is on another system. But that is no problem as long as you have access to the path.
Jochen Arndt 23-Aug-18 17:04pm View
I did not have your directory structure so that I can't test it. But you can by inspecting the log file or inserting additional ECHO commands.
Jochen Arndt 23-Aug-18 13:05pm View
Thank you Dave.
Jochen Arndt 23-Aug-18 13:04pm View
What is the problem with my solution?

However, you may write something similar using PowerShell commands where you have more options.
Jochen Arndt 23-Aug-18 11:04am View
ffmpeg is not required. You can use any library or API for specific GPUs that is supported on the used system.
Jochen Arndt 23-Aug-18 5:37am View
You have to use the full path to the file instead of argv[1]:
QString filepath("/home/maxime/ExportFLIR/image.jpg");

Alternatively select the file by using a QFileDialog.

Note also that the code must be moved later from main() when you have created a GUI. It must be then placed for example within the handler for the button that should start the conversion.
Jochen Arndt 23-Aug-18 4:21am View
It must be
SOURCES += main.cpp
The backslash can be used for line continuation like in C/C++ source files.
But then it must be a single backslash.

Jochen Arndt 23-Aug-18 3:44am View
Your file seems to be invalid.
It executes the C compiler (gcc) passing "/" as source file name.
It should instead execute the C++ compiler (g++) passing main.cpp.
Jochen Arndt 22-Aug-18 7:01am View
You already created a thread. Just pass the TcpListener to your class instead of the TcpClient returned by the accept call.

The basic handling of listening sockets is the same as for normal applications which should use a thread too. The thread function is usually a while loop that waits for incoming connections and handles them. It must check also for a termination condition which should be fired in your case when stopping the service (already done by stopping the listener).

Such should be covered by every tutorial about TCP listening. I suggest to read some because the provided code has been tested while I would have to write it from scratch.
Jochen Arndt 22-Aug-18 6:35am View
Null strings have no length property. So I would expect a different exception being thrown.
You can try using this instead:
if (String.IsNullOrEmpty(signInControl.UserName) || String.IsNullOrEmpty(signInControl.Password))
Jochen Arndt 22-Aug-18 6:12am View
For which line of code is the error thrown?
Your posted code does not contain any line with "Username" (case sensitive).

Always post the complete error message and indicate the corresponding line in the posted code. It helps us to help you.
Jochen Arndt 22-Aug-18 3:35am View
Sorry, I forgot the initialisation (doing mainly C++ where a string object is automatically initialised as empty string).

Fine that you fixed that yourself.
Jochen Arndt 21-Aug-18 9:24am View
It depends on the tool used to create the MSI file. When using WiX, just edit the WXS XML file to add additional files as described in the WiX documentation and tutorial.
Jochen Arndt 21-Aug-18 9:07am View
You have to ensure first that the icon is loaded successfully as shown in my example. Once that is satified you can use it where you want.
Jochen Arndt 21-Aug-18 7:46am View
The artcile is rather old and was only meant for reading. But using the SeupAPI with PInvoke should work even with Windows 10.

Have you checked for an SDK? That is the preferred method.

Any other method requires a lot of reading, understanding how it works, and testing.
Jochen Arndt 21-Aug-18 4:21am View
No. That is again for a single key.

The common method is to implement a validation function fo the whole form or for each field.

Example for a form field:

$('#hpno').on('input', function() {
 var input=$(this);
 // Apply regex to input here and act accordingly
Jochen Arndt 21-Aug-18 3:04am View
The problem is not the regex but where you call it. My regex is for checking a complete input string.

I overlooked that you are using it within a keypress handler. That is not really useful for such checks because you can handle only single characters. While you can check those for being a + sign or a digit, you can't check if the actual keypress is the first character or not.

You might let your initial code in place to catch unallowed characters (which can be simpler and faster performed with an IF condition checking if e.what() is a digit or the + sign) and add a handler to check the whole input string. There you can use the regex from my solution.
Jochen Arndt 21-Aug-18 2:48am View
Did you understand what I and the other's wrote?
Code can only access printer's of the local system where it is running. Because your code is running on the server, it can't access the client's printer.

There are tricks to allow clients to print reports as shown in the links from my solution. But then choosing the printer and selecting printer options must be performed on the client which requires to be initiated by the user.
Jochen Arndt 20-Aug-18 7:03am View
Please don't resurrect old questions to just provide a link to one of your articles.

If the question popped up on the list again for some reason, you probably did not checked the date.
Jochen Arndt 20-Aug-18 6:24am View
There are many examples in the web on exporting listbox data to Excel with C#.
So why do you want to use a VB solution and convert it to C#?

Note also that this site is not providing code conversion services. We will help with specific questions. So you might update your answer, show what you have tried, and explain what is not working. But again, it is better to use example code that is already written in the required language.
Jochen Arndt 20-Aug-18 5:12am View
You did understand what you problem was?

With C#, the == operator compares two items and returns a boolean. But with VB, the = operator is used for comparison and assignment. When used in constructs like those from the C# source, it is treated as assignment. To be treated as comparision it must be part of an IF condition. The solution is to use the Equals() method which returns the required boolean.

When using the = operator, the boolean result is always the same. I'm not sure how VB handles such but for other languages like C# the boolean result of an assignment is TRUE when the value is not zero.

So your code always updates the same text box. That is: both values (horizontal and vertical) are shown in the same text box while the other text box is never updated. That is what I wanted to explain in my updated text.
Jochen Arndt 17-Aug-18 12:53pm View
Compiler messages contain the file name and the line number where the error occured. Locate the line in your editor. Your posted code would not issue such an error provided that p is an int array or a pointer to int (or char but that should raise a conversion warning).

Note also that there is no such thing as an empty character (p[i]='').
Jochen Arndt 17-Aug-18 9:44am View
Exceptions are catched to avoid program termination. But they are usually also used to report errors so that the user (which includes the developer) knows what happened.

If you don't get any exception, the mail has been delivered to the SMTP server. For further investigation have a look at the server logs (optionally after increasing the log level).

But we have no access to your system including the SMTP server so that we can't help more.
Jochen Arndt 17-Aug-18 9:20am View
Any error messages?

Why do you re-throw execptions instead of reporting the errors?
That makes using a try - catch block useless.

Finally (not related to your problem):
Why do you create multiple instances for the credentials and the SMTP client?
Either use the default constructor and set the properties afterwards (like done with the MailMessage), or use the constructors accepting parameters.
Jochen Arndt 17-Aug-18 7:02am View
For an application developer, sockets belong to the lowest level APIs.

But I understand what you mean using embedded system and microcontrollers too.
Jochen Arndt 17-Aug-18 6:38am View
I'm not a Python expert too.

You are not pinging at all. You are trying to connect to port 80 which is usually a HTTP server which fails if there is no such service running. You might print the result value then to know why. If it succeeds, you should close the socket.

If you need a real (ICMP) ping, see for example GitHub - samuel/python-ping: Pure Python version of ICMP ping.
Jochen Arndt 10-Aug-18 3:00am View
Without: No
But knowing about this allows you to reduce the risks.
Jochen Arndt 9-Aug-18 7:50am View
It is not enough code to determine your fault.

But with the MFC document view model, the derived view classes are connected to the derived doc class. They are related and belong together. Therefore, it is no problem to call doc functions from the view directly. That is also the common method. So why do it different and more complicated than all other's do it?

If you need to protect the doc functions, make them protected and declare your view class(es) as friend(s). Then only the doc itself and the friends (views) can call these functions.
Jochen Arndt 9-Aug-18 4:42am View
result.append((const char*)convertedstring.c_str()); is not part of my solution.

Do you know what that line does?
Obviously not. Never use casts except you know what you are doing. Cast are not converting data!

convertedstring is a wide char string. With your example string the first letter is '1'. The ASCII code of that letter is 0x31. The Unicode (UTF-16, wide char code) of that letter is 0x0031. If you cast and assign the wide char pointer to a char pointer that will point to a char string with the first two bytes being 0x31 and 0x00. If you print that string it will just show the character '1' because the next char is NULL which is the string termination character.

AGAIN: If you need to display characters from multiple languages, use Unicode. Converting Unicode to multi byte will not work for characters not covered by the current code page.

That means: Your result variable (or output from your initial question) must be wide char.
Jochen Arndt 9-Aug-18 4:28am View
The IDE is not related in any way to your problems.

It is related to using a library that might not work on your platform, not checking if called functions report errors, and probably (you have not confirmed this) not having the BGI driver files in the directory of your executable.

Did you read the documentation?
Here it is:
It contains example code that include the error checks.
Jochen Arndt 9-Aug-18 4:21am View
No problem.

So he was not able to merge my solution with his existing code and could not even explain where he had problems doing that.
Jochen Arndt 8-Aug-18 12:16pm View
So initgraph() may have failed and you did not checked it in your code. As a result, the behaviour of your running application is undefined which usually lets the application crash or terminate with an access violation like in your case.

When functions provide some kind of status / error, check that in your code!
Read the documentation of the function. It explains how to check for errors and what the different error codes mean. It explains also that you have to place the driver files in the directory of the executable program when passing an empty or NULL path.

But again: It might be even not possible to use it with recent OS versions.
Jochen Arndt 8-Aug-18 11:34am View
Have you changed your code meanwhile to check if the called functions report no errors?

But again: That graphics interface is ancient and has been adopted by the WinBGIm project. Making that running might require some additional work which is far out of beginners scope.

It might be even not possible to use it on recent Windows versions due to the changed shell. Note that even the WinBGIm project is dated from 2005 while the graphics interface originates from 1980's.

BTW: Have you copied the driver files to the directory of your executable?
If not, initgraph() fails which can be detected by checking for success using the gm and gd variables and graphresult.

Jochen Arndt 8-Aug-18 10:43am View
Your image is probably invalid. When loading from a memory stream it must be a valid bitmap (not another image format like GIF, PNG, JPEG and even not a bitmap file which has additional header bytes in front of the bitmap data).
Jochen Arndt 8-Aug-18 10:21am View
Then the only reasons that comes to my mind is that the pricture box is overlayed by another control, is zero sized, or updating (redrawing) is suppressed (where I don't know how that could happen).
Jochen Arndt 8-Aug-18 9:43am View
It is a warning and not an error. When not having enabled to treat warnings as errors, an executable file should be created.

However, it should not happen when using

Depending on the compiler you should also get another warning that main() is not returning a value.
Jochen Arndt 8-Aug-18 9:27am View
Please define "not working".
Any compiler or linker errors?
If nothing happens during runtime, add error checks to your code inspecting the value of gd and/or using graphresult.

But again:
It is an ancient interface designed for MS-DOS. Think about using other interfaces instead of investing time to learn it and get it running on the shell of recent operating systems.
Jochen Arndt 8-Aug-18 6:58am View
I have no Java installed and can't test it therefore here.
So "not working" does not tell me anything useful to get it fixed.

For quick testing you can insert
System.out.println("Description" + value);
Jochen Arndt 8-Aug-18 6:31am View
The program or the compiler?
Probably the compiler because I forgot the parentheses for latsModified().
Jochen Arndt 8-Aug-18 5:41am View
The common method is to access the document using CView::GetDocument() and cast it to your document class (or better implement a function like GetMyDocument() in your view class returning already your document class type) and call the member functions of your document class.

Because CDocument is CCmdTarget based, it can handle messages. For application specific messages define your own ones using WM_APP plus offsets (see and send them to the main frame window. If no other window (main frame itself, active child frame, view of active child frame) handles the message, it is finally routed to the document.
Jochen Arndt 8-Aug-18 3:06am View
Please read the documentation if use a keyword or function.

The count variable contains the number if characters entered. That is what you want. sizeof() is the fixed size in bytes a variable occupies in memory. For an int that is 4 bytes on most platforms.

Read also about the #define statement. It does not require a '=' and must be lower case:
#define USERNAME_SIZE 10

Such can be also detected by just compiling the code.
Jochen Arndt 7-Aug-18 14:19pm View
What do you think is the purpose of the count variable?
It is the number of characters that has been entered and specifies which of the input array items are valid.

USERNAME_SIZE defines the size of the array and so the max. number of characters allowed to be entered and must be defined first with a #define statement.

So you have to use count when writing to file or screen. Otherwise you would have additional garbage characters in your file or on the screen.
Jochen Arndt 7-Aug-18 14:15pm View
My solution has been accepted. I guess he just forgot to add the library to the dependencies. Note also that it is a MS system library and not a self written one.
Jochen Arndt 7-Aug-18 6:38am View
C basics:
Arrays, array indexes, post increment operator
While loop (here: avoid out of bound array accessing)
Null terminated strings (char array)
Jochen Arndt 7-Aug-18 6:05am View
It does not help you to learn if I gave you ready to use code when you do not understand what the code is actually doing.

I will repeat: Take your time and think about it.
What do you need to compare two strings?

Hint: Reading the documentation of memcmp() or strcmp() might help even when not allowed to use them.

You obviously need two variables containing the two strings. And you need the length for memcmp(). For strcmp() the strings must be NULL terminated because that determines the length internally (if you don't know about this, read about the strings in C).

Think about the code I gave you to read the user input. Do you understand what the code is doing?
I repeat:
It reads single characters entered by the user and stores them in an array (the input string). While doing that it counts the number of characters entered. It stops reading when the user has pressed the ENTER key wich is indicated by reading a new line character ('\n' resp. 0x0A). It finally appends a NULL byte to the array to create a valid C string.

So you have then an array (input string) and it's length.

Do this for all required user inputs storing the results in different variables. Use these variables to perform the additional tasks (here compare two strings).

When having a task to be implemented by a programming language, perform an analysis similar to the above before writing any line of code.

Then break it into subtasks (here: read input from keyboard, compare strings, write to file) and define how these parts communicate which each other (here: the variables required for input and output of the tasks).

When all the above is done, start implementing it by code.
Jochen Arndt 7-Aug-18 2:30am View
Again: Take your time, read my posts and think about what to do.

"It is basically implementing your own version of memcmp()"
That means you have to write code doing the same as memcmp() because memcmp() is a C library function.

"The first check is comparing the lengths which has been stored in variables after reading the user input."

That means you need the length of password1 and password2 in two variables.
Jochen Arndt 7-Aug-18 2:25am View
To get the creation date you have to get the file attributes. Search the web for something like "java file creation date".

But note that file creation dates are not supported by some file systems.
Jochen Arndt 6-Aug-18 10:42am View
Where it should happen is quite obvious:
After the data has been entered and before writing to the file.
Then re-read my solution on how to do this. It is basically implementing your own version of memcmp().
Jochen Arndt 6-Aug-18 10:02am View
Please take some time and think before writing code.

Would it make sense to store all strings entered by the user in the same single array kbinput?
Jochen Arndt 6-Aug-18 9:19am View
You have to use the snippet from my previous post for every input string. That is: For username, password and passord2.
Jochen Arndt 6-Aug-18 8:51am View
You have to read single characters in a while loop like
char kbinput[KBINPUT_SIZE];
char c;
int count = 0;
 read(0, &c, 1);
 if (c == '\n')
 kbinput[count++] = c;
while (count < KBINPUT_SIZE - 1);
kbinput[count] = 0;

Also: strcmp() is again a C library function.
Have you tried "man strcmp" as suggested?
Jochen Arndt 6-Aug-18 8:18am View
printf() and strlen() are C library functions. You have to use write(1, ...) instead of printf. Just search for "man printf" (or enter it on a Linux shell if present) and you will notice that they belong to section 3 which contains the C library functions.

You must also use a loop to read character by character from the keyboard as explained in my solution (which avoids also using strlen() when counting the characters in the loop).

Your code will wait until 10 characters has been entered and does not append a NULL byte so that strlen() and printf() would fail anyway.
Jochen Arndt 6-Aug-18 6:05am View
And what is your problem?

The code is generally looking OK besides that sqlsrv_close( $oconn); should be called after the last closing '}' and the parameter name 'searchimput' might be wrong (O would expect it to be 'searchinput').

And you do know that the used PHP SQL functions are for Microsoft SQL Server databases requiring the MS SQLSRV driver for PHP?

We can't help more because we did not know about your database and you have even not shown a valid SQL query.
Jochen Arndt 6-Aug-18 4:00am View
You have to find out which file can't be found (complete path). Checking the error log file of your web server might help with this. Then check where in your code the file is used. In most cases the problem is the path component of the file.
Jochen Arndt 5-Aug-18 17:50pm View
You can embed Python in C/C++ (call Python code using an installed Python interpreter) as explained at

Jochen Arndt 5-Aug-18 4:53am View
I have no access to the system where the problems occurs, does not know about the code being used or even which Windows and Excel versions are involved.

So I can't really help.

If you perform a web reserach with the error message, you get some results. Check them if they apply to your case.
Jochen Arndt 5-Aug-18 4:08am View
You have to pass the complete function code to evaluate() first and then call that function using either the method from my solution or by performing another evaluate() call on the same engine instance calling that script function.

I have not tried it but for your case you should load your script as shown in the documentation from my link and then call the functions defined in the script with another evaluate() call using the function name and the parameters. But note that the parameters can't be passed by value in this case (are part of the string).
Jochen Arndt 3-Aug-18 7:46am View
I tested your example code with G++ calling mete_cylinder() for a local instance of c_static2D in main() and got no access violation.

I guess the problem is located in code not shown by you. A possible source is a corrupted stack or heap due to out of bound writing. Another source might be using different versions of a library (from different modules - especially when using static linking - or one module usies the debug and other(s) the release version).
Jochen Arndt 3-Aug-18 5:02am View
So you expect us to read this large amount of unformatted code and find the portions that are responsible for reading and showing the positions?

Please cut your code down to this portions and format it using the appropriate option in the editor window. Then you might get an answer here. But have also in mind that we did not have your hardware or the specification of the communication protocol. We can only check the code you show us.

But you can do a lot more because you have the hardware and a tool to inspect your code while it runs: the debugger.
Set a breakpoint at the code that reads the positions and then execute the code step by step watching the related variables.
Jochen Arndt 2-Aug-18 18:01pm View
CSQ 0,0 means that the signal strength is at the lowest level (-113 dBm or less).

From your link: "Ideally signal should be between 10-31"

A value of 10 corresponds to -93 dBm which is 100 times stronger than -113 dBm!
Jochen Arndt 2-Aug-18 10:56am View
Yes, it is complex.

Perform the replecment in two steps:
The replacement of /details/ to /download/ is simple, as usual and does not require a regex.

For the second use a grouped match of everything after the last slash until end of line (untested: "\/([^/]+)$") and replace that with
match + "/" + match + ".pdf"
where match is referenced by \1:

You have to check it because that is from scratch without testing it.

Jochen Arndt 2-Aug-18 5:08am View
If you want to reply to a comment use the "Reply" button right of the comment like I have done here. Then the initial poster will get an email notification.

I saw this only by chance when coming back from your post at Hardware & Devices to post this:
Please don't crosspost (ask the same at multiple places on one site). You might get answers on both from different people who did not saw your other post. As a result you might get the same or a similar answers on different threads. That is wasting time of people trying to help you.

I suggest to delete your post at Hardware & Devices because you got replies here meanwhile.

Back to your problem:
It is - as already said - very probably a hardware problem for which this site is not the best choice.

If you tried it with two antennas, they are probably OK. But did you checked the connector and it's soldering on the PCB? A quick web research shows that multiple users of the SIM900 had problems due to badly soldered antenna sockets. A "+CSQ: 0,0" is an indicator for such hardware connection problems when other non connection related commands are working.
Jochen Arndt 2-Aug-18 3:40am View
Check your antenna connection (socket, plug, cable, and antenna).
Jochen Arndt 2-Aug-18 3:02am View
Call GetDlgItem(IDC_STATICDISPLAY)->UpdateWindow() afterwards to force redrawing.
Jochen Arndt 2-Aug-18 2:58am View
That can't be answered without seeing some code and some (at least the first) complete error message.

Use the green 'Improve question' link to add this to your question:
- The first one to max. five complete error message (copy and pasted)
- The top of your cpp file (with all include directives)
- The Myheader.h file (truncated if too large, should contain the lines around those mentioned in the above error messages if they refer to this file)
Jochen Arndt 1-Aug-18 9:11am View
The link from my solution suggests to change the corresponding option in the mysqld configuration file until the client (PHP mysqli here) supports the new authentication method.

But changing the method for the user should work too. Do you have passed the correct password?
Jochen Arndt 1-Aug-18 7:49am View
Oh, yes. I was focused on all these errors.
But that can be done with a simple while loop.
Jochen Arndt 1-Aug-18 5:40am View
I'm not an Android developer so I have not much insight.

But it might be the same problem as described at
findViewById() not working in a not MainActivity class

You might also use a different method as described at
No More findViewById
Jochen Arndt 1-Aug-18 5:33am View
You are welcome and thank you for accepting my solution.
Jochen Arndt 1-Aug-18 4:31am View
The interesting portion of your code would be that which gets the user input, queries the database and leads to the message box being shown.
Jochen Arndt 1-Aug-18 3:41am View
Some tips:

Never store dates and times as text. Store them in a (binary) format supported by the used database engine.

Store datetimes always in UTC. This avoids you a lot of trouble with handling time zone information and daylight savings times. If you want to display data later using local time, store the time zone of the user in an extra field and use that to get the local time for the user.

As already mentioned:
The duration can be simply calculated from two datetimes. Using UTC time stamps ensures that you always get the correct result.

Use the functions from the database to set timestamps to now. That will also ensure that the stored value is in UTC.
Jochen Arndt 31-Jul-18 8:48am View
That is the a correct answer:
The system itself has internet access.

But due to your specific setup, access to some services - like probably HTTP[s] - is restricted by using a gateway / proxy which - again in your case as I understand - requires authorisation.

So your question is probably
"How to check if the current user is allowed to access the internet"?

That can be only answered when knowing which restrictions are set for authorised users and for others and how the authorisation is implemented. That means you have to find a protocol and a server that is allowed for authorised users and denied for others. The person who can help with this is the administrator of the ISA server.
Jochen Arndt 31-Jul-18 7:50am View
See my updated answer.
Using ping is the least reliable method even when not filtered.
Jochen Arndt 31-Jul-18 4:02am View
The error message is quite clear: You are not passing a password when connecting.

So it is not related to any drivers, packages, or setups. It is where you are executing the connect.
Jochen Arndt 31-Jul-18 3:54am View
Please don't post questions as solution to old threads. You won't get any answer here.

Delete this and raise your own new question. But when doing so, provide more information. Without that (here for example showing the code related to the problem) it is impossible to help.
Jochen Arndt 30-Jul-18 8:57am View
We would be able but will not do your homework for you.

Reread your course notes and / or a C++ tutorial. If you then still have a specific question, we will help.
Jochen Arndt 30-Jul-18 6:57am View
Why should I?
I already know about the IEEE 754 standard.
Jochen Arndt 30-Jul-18 4:30am View
Please don't repost. You have already asked this at How-to-fix-the-error-the-remote-server-returned-an.
Jochen Arndt 28-Jul-18 19:07pm View
I can't know the answer because I neither know the type of your database fields nor the type of your variables.

However, in your initial question the month value was passed as 'Jan' which is a string. Such must be passed quoted if stored as such strings in the database or converted to a corresponding integer otherwise.
Jochen Arndt 27-Jul-18 9:48am View
That is identical besides using different variable names and printing the result inside the loop. The latter is even wrong because nothing would be printed when the exponent is zero (then the body of the loop is never entered).
Jochen Arndt 27-Jul-18 8:59am View
Check the error log file of your web server. It should contain more information.
Jochen Arndt 27-Jul-18 8:38am View
Thank you for that. I will update my answer.

I realised it meanwhile too but thought he should know due to all the other post mentioning it.
Jochen Arndt 27-Jul-18 4:15am View
Please try to be more specific on what is not working.
Does the b.load() call fail?
If so, does the file nehe.png exist (is an embedded resource)?
If it exists, is it a valid image file (the extension indicates a PNG, not a BMP)?

Regarding the macro redifinition:
Check where it is defined (both places). The warning message should contain this information. Then check why it happened. We can't help without knowing about the definitions and which files contain them. It might a conflict of different versions or a conflict between unrelated modules.
Jochen Arndt 26-Jul-18 8:49am View
Which error (full message text)?
Jochen Arndt 26-Jul-18 7:59am View
But you still did not give us a detailed error description (what exact error occured where). "Does not work" does not help us to help to you.

But even if we have a detailed description, we still have to guess because we have no access to your database.

That is what I had done in my updated answer. But you can simply check it step by step:
Is the query successful?
If not, is there an error message?
If yes, what is the value of the 'image path'?
Is that a valid path for the web server?
Does the file exist?

The above process is called debugging. But such can be only done by you. We can only give some tips / hints, and find obviously wrong code.
Jochen Arndt 26-Jul-18 7:19am View
It does not fetch the image but would show it when $image_path is a valid path that can be accessed by the web server.

Your code would not do that even when the path is valid.

However, put all the code into one PHP block (that is put the echo command just after querying from the database).

You should also check if the query was successful.

Anything else requires the full error message (it is still unclear where the error occurs and what the corresponding code is doing).

Also, your code looks not valid at all. I will update my answer.
Jochen Arndt 26-Jul-18 7:02am View
See my solution I have posted meanwhile.
Jochen Arndt 26-Jul-18 6:40am View
Your error message is
"Undefined variable: image_src ..."
but your posted code did not contain this variable.

Check the full error message. It contains the file name and the line number where that undefined variable is used. Then check the source code in the mentioned file.

If you are still stuck, update your question with the full error message and the relevant code.
Jochen Arndt 25-Jul-18 5:40am View
Believe me: It does not help you to get something "working" without having at least basic knowledge about the topic. It will get back to you sooner or later.

Developing is not only (re-)using other's work. It is knowing at least the basics of topics (learning them if required) and then using this knowledge for implementation.

Also using technologies like OpenGL is not a beginner topic. If this is some kind of private / learning project, I suggest to start with something simpler.

Finally, I (and most - if not all - others here) are trying to help you understanding your problem so that you learn something. But we will not do your job for you; especiall if you are only interested to get your work done ASAP. We are all answering voluntary here and have our own jobs to do.
Jochen Arndt 25-Jul-18 2:48am View
A common solution has to create a connection to an external service which returns the information. If you care for speed, write your own service that simply replies with the IP address and host it somewhere. That should be much faster than a HTTP based service.
Jochen Arndt 24-Jul-18 9:35am View
Then I have no more idea besides the already mentioned one:
Ensure that your HTML does not contain multi line content.
Jochen Arndt 24-Jul-18 6:19am View
When doing it manually with an active Excel instance:
Instead of selecting the cell and pasting there, select the cell and paste into the formula input field shown top of the Excel application window below the menu bar.

I think the corresponding automation method would be using Range.PasteSpecial with Paste:=xlPasteType.xlPasteFormulas

You might give it a try.
Jochen Arndt 24-Jul-18 5:43am View
As I expected:
You are pasting lists which is Excel spanning into multiple cells. You are also using br (line break; that is not "spacing") tags which Excel is also treating as "insert into next line".

Why do you have lists with only one element?
It also not really valid HTML because br tags should be inside other block elements (usually p blocks).

Excel organises data row and column based. When inserting data which are organised similar, they are inserted into multiple cells. If you don't want this behaviour, you have to prepare the data accordingly.

A quick web research reveals the solution when doing it manually:
Paste into the formula bar input field instead of the cell.
But I don't know if this can be also done programmatically (inserting formulas can be done but I don't know how to "paste" HTML there).
Jochen Arndt 24-Jul-18 5:08am View
It would help much better to see the HTML source of the text to be copied.

I don't know for sure how Excel handles inserting HTML but I guess it is inserting specific formats like tables and lists into multiple cells.
Jochen Arndt 24-Jul-18 4:38am View
See my updated answer.

I suggest also to read about the basics of C/C++ programming tools and how they work (keywords preprocessor, compiler, and linker). It helps understanding what is going on and why specific errors might be thrown.

But explaining it here is far beyond the scope of a comment and "quick answer".
Jochen Arndt 23-Jul-18 17:52pm View
std::cin >> var works also for bool, int, float, and double.

If you have a string use atof() or strtod() to convert it to a double, atoi() to convert to an int or strtol() / strtoul() to convert to a long / unsigned long.
Jochen Arndt 23-Jul-18 15:38pm View
Not really. But it is then clearly on that specific system. Ask the owner if he has some other "security" software installed.
Jochen Arndt 23-Jul-18 9:09am View
Not globally when not knowing how data are handled by the active application.

After having passed keys, you would have to undo and insert new text. So you have to know what has been inserted where and how to change it. That requires tracking the active window which receives the keys and accessing that window to modifiy the content. While theoratically possible if not prevented by security settings, it requires a lot of work and has a great potential of abuse and is prone to unwanted side effects.

Your example for Sublime does not count here: It does it on application level.
Jochen Arndt 23-Jul-18 8:30am View
You are welcome and thank you for the feedback and accepting my solution.
Jochen Arndt 23-Jul-18 8:28am View
As I told you: You can't predict what the user enters.

You always have to know what has been entered and might then change it according to sume rules. But that requires to do it on application level because only the application has for example access to an edit control, knows what is contained in there, and can change it's content.
Jochen Arndt 23-Jul-18 3:25am View
The posted code still does not contain the line where the error is thrown.

You have shown us the ShipmentEntity class meanwhile. But that does not contain a display() member function and is not derived from another class which might contain the function.
Jochen Arndt 23-Jul-18 2:53am View
You have posted the wrong code.

Your code does not contain any usage of the shipmentEntity class and the index variable k mentioned by the error.
Jochen Arndt 20-Jul-18 9:10am View
If you did not find the setting in the router's web interface you have to consult the manual.
Jochen Arndt 20-Jul-18 9:01am View
Then check the router settings (optionally read the manual first). I still guess that port 995 is blocked there (using POP3 is rather uncommon nowadays) while port 587 is allowed. If the router provides a log (common and accessible by the web interface) it might also contain entries about blocked packets.
Jochen Arndt 20-Jul-18 6:18am View
Your first approach using a (recursive) tokeniser and checking the syntax when a token can't be broken down anymore is the way to do it.
Jochen Arndt 20-Jul-18 5:27am View
Reference about what?

Requesting a reference requires naming the topic / method / specification.
Then it is easy to get the information with a web research.

See Logging in Tomcat which explains how you can setup logging with Tomcat. If you want to use a database, select a logging toolkit that provides such functionality, install it, and configure Tomcat to use it. Then the log database is updated with each new log event.
Jochen Arndt 20-Jul-18 3:45am View
When using variables shared by threads, you must ensure that only one thread at time accesses these. I don't see any method doing that in your code.

PostMessage() is the method to be used when passing messages from one thread to another. But I don't know about the organisation of your application (what is called when by which thread) and what values these 'globals' actually hold.

I still guess that your problem is sourced by a bad thread design. Maybe your design is even wrong and can't work as intended.

A general approach is executing all GUI operations (including window creation) in the main (GUI) thread and doing background operations in worker threads which use PostMessage() to send data or notifications to GUI elements (windows or controls). For the other direction use events for signaling. For shared data use appropriate locking mechanisms.

See the MS documentation of WM_APP / WM_USER. It is explained in detail there.
Jochen Arndt 20-Jul-18 3:04am View
It is still not possible to understand what is happening. We don't know what all these 'global' members are and what they contain, and when and how the posted code is called. It seems also that different threads are involved.

The usage of 'global' indicates that you have at least a bad design. If this is used from different threads it will very probable not work without some kind of locking mechanism.

Note also that you should use WM_APP instead of WM_USER when posting messages between different windows.
Jochen Arndt 20-Jul-18 2:41am View
You can't besides implementing a service on the client that accepts connections from the server to access the token.

But that would circumvent the purpose of such signing: A document should be signed by the creator using the creator's certificate.
Jochen Arndt 19-Jul-18 13:08pm View
It is not related to Tomcat (or any other web server) besides having that running, knowing the local document root path, and navigating to your page in the browser.

You have to create a valid HTML file.

Do you know the the document root path of your web server?
Store the file there or in a sub directory.

Do you know how to create a file with C/C++?
Do it.

Do you know (at least a little bit) HTML?
Write your ouput in HTML.

When you have to update the file, do that. Create either a completely new file or locate the position in your existing file where to insert the new data.

Note also that you can't automatically show a page in a web browser. You have to first open the page in the browser manually. There is also no standard HTML 4 method to inform that a shown page has been changed. It requires recent technologies like HTML 5 or websockets, or using scripting frameworks.

If you know the interval of changings, the simplest method would be using the
<meta http-equiv="expires" content="0">
header tag to tell the browser that it should not load the page from the cache and
<meta http-equiv="refresh" content="interval_in_seconds" url="the_url_of_this_page"> to reload the page every interval_in_seconds.

For reloading you might also use a JavaScript timer that calls
which forces also by the true parameter reloading from the source instead of the cache.
Jochen Arndt 19-Jul-18 10:03am View
The culprit is the GDI+ function GdipLoadImageFromFile() which returns the GpStatus code 3 (OutOfMemory) when loading the image fails due to an unsupported image format or a corrupted file.

There is the GpStatus code 13 (UnknownImageFormat). I guess that it was a typo in the source code which was detected too late.
Jochen Arndt 19-Jul-18 9:35am View
It can't be directly translated to C++.

You have to implement the interface and the event sinks as described in the CP article from my solution.

The article provides the implementation. So you are lucky and have not to do it yourself because - as KarstenK noted already in his comment - implementing such COM interfaces and sinks is an advanced and difficult task.

However, if you need to modify the article code to match your needs (which I guess is necessary) you should have read about COM interfaces with C++ / MFC before and understand at least the basics.
Jochen Arndt 19-Jul-18 9:19am View
I did not checked the component site.

It might be then even not Flash related but a HTML5 or script related problem.

If they have a support forum or something like that it would be probably better to ask there.
Jochen Arndt 19-Jul-18 9:09am View
That will never happen because creating a new exception might let existing applications terminate when they did not catch generic exceptions (System.Exception and System.SystemException) but only the specific exceptions that might occur.
Jochen Arndt 19-Jul-18 8:00am View
As a starting point for further investigations:
Error 0x80010108 is RPC_E_DISCONNECTED, "The object invoked has disconnected from its clients".
Jochen Arndt 19-Jul-18 6:53am View
Not an answer to your question but you should think about using other methods like HTML5 instead of Flash. That applies especially when your web page should be public and useable for more than two years. Flash will be not updated and distributed anymore at the end of 2020.
Jochen Arndt 19-Jul-18 6:34am View
For testing you use the "normal" volume setting as already done.

For leveling do what I have suggested:
Use -12 to -6 dB or less for monotone sounds (that was the word I was looking for but it did not came to my mind while posting). Play with the gain in the audio editor until you and other testers think it sounds equally loud to other sounds.
Jochen Arndt 19-Jul-18 4:17am View
Please raise a new question instead of posting a solution (which it isn't) to old threads.

When doing so, add the related code lines where the error occurs. Without that, nobody can help.

However, the error is common and means:
You access an array item where the passed index is outside the range of items contained in the array. Allowed indexes are from zero to array size minus one.
Jochen Arndt 19-Jul-18 3:34am View
Would be good to know which function call throws the execption.

It might be con.Open(). Then check your connection string.

It might be also later when using the SqlDataReader object returned by cmd.ExecuteReader(). But you did not show the code using that.
Jochen Arndt 18-Jul-18 9:52am View
Fine to hear that you got it solved and thank you for the feedback.
Jochen Arndt 18-Jul-18 9:13am View
To verify this first, just disable / remove your handler. Or check if other standard accelerators like Ctrl-A (select all) are working (if not also catched by the handler).

It is also not necessary to know what the handler does but how it is called / added to the message handling if it is the culprit.

If so, edit your question using the green 'Improve question' link. Then others might help too.
Jochen Arndt 18-Jul-18 8:21am View
When in edit mode, Ctrl-C should work as in any edit control.

Maybe your Ctrl+C/Ctrl+V handler for entire nodes suppresses forwarding the accelerator activation to the edit control.
Jochen Arndt 18-Jul-18 4:41am View
If you have an USB token, it will be of course only accessible on the system where it is plugged in.
Jochen Arndt 18-Jul-18 2:47am View
Than it is most probably pEncrypted and/or encryptedLenInBytes because paddingInfo looks fine, an invalid handle would return NTE_INVALID_HANDLE, and an invalid flag would return NTE_BAD_FLAGS.

So check those.
Jochen Arndt 17-Jul-18 12:31pm View
Yes, I saw and understand that comment.

But are you setting cbDecryptedMessage in the not posted code?

Because the first call to get the required buffer size succeeds, the error must be for one of those parameters ignored with the first call.

And these parameters are cbDecryptedMessage and pbDecryptedMessage; the only ones not shown to be initialised in your posted code!
Jochen Arndt 17-Jul-18 8:32am View
Then it should be not empty if the request has been successfully send and a response has been received.

But we still can't help because we have no access to your code, the server, or even know what you have done before getting the response string.
Jochen Arndt 17-Jul-18 8:22am View
Is the HRESULT S_OK and was the request successful?
Jochen Arndt 17-Jul-18 8:12am View
GetresponseText() is not an IServerXMLHTTPRequest member function and we don't know what you have done before calling that function (e.g. if you have checked if the request was successful).

So we can't know what happened.
Jochen Arndt 17-Jul-18 3:39am View
As I wrote:
"I don't know if this solves all your problems"
But you have to set the ContentType.

Would be good to know on which line the error is thrown and to see the full message.
Jochen Arndt 16-Jul-18 12:41pm View
And is it properly initialised there?
Jochen Arndt 16-Jul-18 9:42am View
The variable driver is nowhere defined and initialised in your code.
Jochen Arndt 16-Jul-18 9:27am View
It might be sourced by the missing '@' in front of CurrYear in he VALUES list of your SQL statement.