|
oh the life of manufacturing systems.
If I build a dll on a Windows 10 machine, is there hope for it to run under Xp? Assuming I don't do anything silly and use post Windows Xp features?
I've just discovered with this inherited piece of code that the customer runs it under Xp. I'm thinking just use the Xp tools and stay there.
Charlie Gilley
<italic>Stuck in a dysfunctional matrix from which I must escape...
"Where liberty dwells, there is my country." B. Franklin, 1783
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
|
|
|
|
|
Judging by other reports I have seen the answer is: it depends. Microsoft has never tried to be backwards compatible in their systems but some applications will still work. The only way to find out would be exhaustive testing. But for a commercial product I would suggest that you should stick to XP for all development and testing.
|
|
|
|
|
By any slim chance, does anyone have the code for triangular plate bending finite elements? I'm looking first for the stiffness matrix. I can read C, Fortran, python, Java and probably figure out some others. Any help would be appreciated - Thanks, Ed
|
|
|
|
|
You seem to think there's only one way to write that kind of code.
And, no, nobody is just going to hand over there hard work writing that kind of code, unless they want to publish it on the web. In that case, Google is your best friend.
|
|
|
|
|
In earlier 70s I used one of such types of triangle thin bending elements (so called "incompatible elements").
The base knowledge about FEM I got from the O.C. Zienkiewicz book: it called somehow like "finite element method in engineering science" or similar. There were some ideas of to implement this type of element and a lot of Fortran code examples 9very simple but very useful!)
Not sure you will be able to find in Web something useful about it, but just try!
As for me, I have lost all my sources (punch cards desks and listings) many years ago.
|
|
|
|
|
Victor, I have that book and many others. I've written the code for quadrilateral plate elements (also when we used punch cards) but I have a client that wanted something quickly. I just thought I'd ask and try to save myself a couple of days. Thanks.
|
|
|
|
|
I create an application in C++(MFC) but I did not find a way to design a report in VS2019 toolbox;
please can anyone help with an example in how to create or generate a report in C++/MFC;
thanks in advance;
|
|
|
|
|
What kind of "report" do you mean?
|
|
|
|
|
a FMC program to calculate electricity bill then print out a report with a header and footer
|
|
|
|
|
Do you mean something similar to CR-report?
Or just a List Control (MFC CListCtrl) in report (Detail) style?
|
|
|
|
|
|
|
I find it easier to create an HTML file that I can format, and then open that file with the default browser. The user can then print at their discretion.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
How can I know the version of an console application executable ? (obviously, this exe is not made it by me)
|
|
|
|
|
Unless the executable contains version information you can't. It is possible to add version information in a resource definition file when building a console app, but few people do so. Right click the .exe and check the properties.
|
|
|
|
|
Yes, I have checked properties in Windows, Explorer, but show me nothing. I thought there is another way to find it.
|
|
|
|
|
In that case it does not contain 'standard' version information. There may be other information held in the program but only the creators will know where it is.
|
|
|
|
|
does it have by chance a "-v" or "-version" or "/version" command line parameter ?
I'd rather be phishing!
|
|
|
|
|
No, I don't have such option.
|
|
|
|
|
How do you know that such executable actually has a version?
"In testa che avete, Signor di Ceprano?"
-- Rigoletto
|
|
|
|
|
That it is a good question. I don't know if it has a version.
|
|
|
|
|
Have you looked at the date field in the PE header?
See PE Format - Win32 apps | Microsoft Docs[^]
It’s not exactly a version information but it might give you an ordering of the different versions. That’s assuming the linker used to create the app bothered to fill it. Most, but not all, do.
Mircea
|
|
|
|
|
Hi!
I try to implement a callback function within a dll, which triggers an assigned function in the main application. I want to trigger this "event" in the main app from within the dll.
Here is my code from the dll:
extern "C" __declspec(dllexport) void funcA(const unsigned long long a, const unsigned long long b);
extern "C"
{
typedef void(__stdcall* callback_t)(unsigned int halfbeast);
__declspec(dllexport) void public_func_taking_callback(callback_t evHnd)
{
evHnd(333); }
}
void funcA(
const unsigned long long a,
const unsigned long long b)
{
if(a>10) callback_t(public_func_taking_callback);
}
Here is the code I use in the main application to load the library and attach to the functions:
typedef void (__stdcall *eventCallback)(unsigned int miau);
typedef void (__stdcall *setCallback)(eventCallback evHnd);
void __stdcall CallB(unsigned int);
void __fastcall TForm1::Button1Click(TObject *Sender)
{
signed int retval;
unsigned int i;
char txt[7];
unsigned long long a,index;
UnicodeString USt;
HINSTANCE dllHandle=NULL;
dllHandle = LoadLibrary(L"test.dll");
if (!dllHandle){
ShowMessage("Could not load test.dll");
Form1->Close();
}
else{ void (__stdcall* funcA)(const unsigned long long a, const unsigned long long b);
funcA=(void(__stdcall*)(const unsigned long long a, const unsigned long long b))GetProcAddress(dllHandle,"funcA");
setCallback values=(setCallback)GetProcAddress(dllHandle, "public_func_taking_callback");
if(values != NULL){
values(&CallB);
}
if(!funcA){
Memo1->Text="No handle to function found.";
}
else{
funcA(1,1);
funcA(100,100);
}
FreeLibrary(dllHandle);
}
}
void __stdcall CallB(unsigned int halfbeast){
ShowMessage("triggered");
}
What happens is unfortunately not what I wanted:
1) In the very moment the line "values(&CallB);" is executed, CallB is called. This is not what I wanted, I justed wanted to give the callback pointer of the dll to my function CallB.
2) CallB is not called when the line "funcA(100,100);" is executed. Most likely there is something wrong with the function call within the dll, but I cannot see it...
|
|
|
|
|
1. That is correct. At that point, values is set to public_func_taking_callback , which takes the address of a function and immediately calls it.
2. funcA calls callback_t , but callback_t has never been set to any value.
To be honest, I find it difficult to understand your code, so I may have still missed something. However, you should be able to see the exact sequence of events by running the code in the debugger.
|
|
|
|
|
Hi Richard,
thanks for the answers. Yes I can debug it, but it doesn't help me much, since I don't understand why it behaves that way.
1.) OK, got it. Unfortunately then I do not know, how I pass the address of the function of CallB to the dll. I want the dll to call CallB() in the moment callback_t is called.
Most likely I confuse here something, but I find it very hard to understand the syntax. It seems even harder since it is wrong
I wasn't able to find any C++ examples for that.
2.) I thought I set it to public_func_taking_callback, but obviously this is not the case.
Maybe I should explain again, what I try to do:
In my main application I want to declare a function. This function should be registered in the dll as a callback function. When during run time in the dll some criteria match ( if(a>10) ) the dll should call the function in the main application and execute it.
|
|
|
|