Maximilien wrote:
If the function is not "published" in a header file, a normal user will not call it.
I agree with you on that. Thanks Maximilien.
Maximilien wrote:
If the function is not "published" in a header file, a normal user will not call it.
I agree with you on that. Thanks Maximilien.
DavidCrow wrote:
Even with these new constraints, my suggestion will still work. All you have to do is choose a number to pass to the exported foobar() function that will likely not be guessed by others.
You are right. That is a Workable solution. Thanks David.
DavidCrow wrote:
The only thing I can think of it to pass an argument to the foobar() function.
Thanks David. But maybe I did not put my question correctly. I have a library and I want to hide a function from direct calling by functions which are external to the library. Kind of like keeping it in private: section of a C++ class. But the problem is, I want the library in pure C and not C++. So, my library function 'foo()' should be able to invoke foobar() correctly. However, if an external function bar() tries to invoke it, the library should be able to correctly identify it and return appropriate error. Appreciate your help.
Hi All, Is there a way to know the reference to the calling function at runtime without using some flag variables? For eg. void foo() { foobar(); } void bar() { foobar(); } void foobar() { /* What will be the condition for this IF? */ if (calling function is 'foo') { bla... bla.. } else { bla... bla.. } }
Thanks.
... or else PEResourceExplorer
Did you consider 'Resource Hacker' ? You can directly extract, modify and compile resources using it. Nice and pretty sophisticated tool. Not exactly what you want - but should serve your purpose - without even giving out the source :-D
I have been using IZArc for sometimes now, and had never faced any problems. The interface is really nice.
I have a few Property pages (not Wizard). On one of these I am displaying a picture (Picture Control). The file name is in a global variable. When I initialize it, the picture is displayed correctly. If a file is loaded, I want to show the picture when the user switches between the tabs. Currently when I come back to the tab with picture it is not displaying again. I have written the following code in OnSetActive event - if (g_strFileName != "") { CDC *dc; dc = GetDC(); CPicture ppic; ppic.Load(g_strFileName); CRect rc; GetDlgItem(IDC_RECT_BITMAP)->GetWindowRect(rc); ScreenToClient(&rc); ppic.Render(dc, rc); ReleaseDC(dc); }
I am also calling Invalidate(TRUE) in InitDialog. Any help would be appreciated. I have also tried OnPaint/ InitDialog etc. No luck. Thanks.