|
CFileFind
-Steven Hicks
CPACodeProjectAddict
|
|
|
|
|
How can I know the name of functions & its Parameters of Unknoun DLL file ?
Iman Ghasrfakhri
|
|
|
|
|
One solution is to win32 system program such as dumpbin.
c:\winnt\system32\dumpbin -exports unknown.dll
Kuphryn
|
|
|
|
|
functions: use Dependency Walker
parameters: you can't, unless you have a header-file with the function declarations
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Greg S. wrote:
parameters: you can't, unless you have a header-file with the function declarations
You can dissasemble the function and find the parameters it accepts . Surely it will be a last resort, but if you can't get the function spec...
"semper aliquid haeret", Bacon.
-- Sebastián.
|
|
|
|
|
Hello all.
I am just playing around with Visual C++ 6.0 lately. I have simple code right now and all it does is read a 350K text file (with fgets) and looks for certain strings in that file and adds them to a listbox.
I noticed that when I run the program (without a progressbar) it takes about ~1 second to complete. However, as soon as I implement the progressbar, it takes about 3 seconds to complete for a non-smooth bar, and about 10 seconds to complete for a smooth bar.
I've tried two methods of updating the progressbar. The first was I just use SetPos() so I tried using SetStep() and StepIt(). Both of these methods dramatically slow the program down. If I take comment out the SetPos()/StepIt() methods and run the program again, it is blazing fast.
I am wondering if anyone knows how I can somehow speed up this process or maybe I am doing something wrong which is causing it to run slower, or is that just the nature of using a progress bar? I really want to have a progressbar in there for the bigger files that I am going to read, just because it looks cool. But in my program, it will eventually read 100's of files and parse through them, so the 5 seconds here and there will really matter. Any ideas on how to speed this up would be appreciated!
Shultas
|
|
|
|
|
Any drawing that is done on the screen will slow a program down, so I would think the best way to speed the program up is to update the progress bar less often, step it every 100K instead of every 10K so your 350K file would only redraw the progress bar 4 times instead of 36 times.
Sonork 100.11743 Chicken Little
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
Within you lies the power for good - Use it!
|
|
|
|
|
In all honesty, at first I thought that this method would make the progress bar look somewhat "choppy", but I gave it a try anyways.
PERFECT results!
I did a check of how many times the While() loop was getting executed. Over 39,000 times. So I guess you could say that 39,000 calls to the SetPos would indeed slow the program down .... I just put a lil helper variable in there and called it every 2,000 passes and it blazes perfectly fast just like it did when there was no progress bar at all.
Thanks very much for your help. Just a dumb little thing like that I spent a solid hour trying to figure out what the problem was! I guess if you call SetPos(1000) ... SetPos(1500) ... SetPos(2000), out of 39000 tries, between 1000-1300 is the same bar (meaning the progress bar never gets updated to add another bar to it between those numbers), but when you call SetPos() it appears that it still takes some processor time (even though the bar never physically changes).
Thanks again!
|
|
|
|
|
shultas wrote:
when you call SetPos() it appears that it still takes some processor time (even though the bar never physically changes).
SetPos() eventually calls SendMessage() which results in a call to the progress bar's window procedure, which handles the message and undoubtedly calls RedrawWindow() , which results in a WM_PAINT being sent to the progress bar, which again calls the progress bar's window procedure, which then does various GDI calls to do the painting. So yes, all that does take CPU time.
--Mike--
Ericahist | CP SearchBar v2.0.2 | Homepage | 1ClickPicGrabber New v2.0! | RightClick-Encrypt
Laugh it up, fuzzball.
|
|
|
|
|
Hi:
When I build the dll(created by others),VC says: fatal error C1189: #error : Please use the /MD switch for _AFXDLL builds,where to set this flag?
Thanks
benben
|
|
|
|
|
> Please use the /MD switch for _AFXDLL builds,where to set this flag?
In VC6 go to:
Project -> Settings (or Alt+F7) -> C/C++ Tab -> Project Options
RK
|
|
|
|
|
|
When the twisted-pair has been pulled out from a network adapter, windows 2000/xp shows the network adapter is disconnected, but how can I get this change in my application?
|
|
|
|
|
One possible solution is to access rasapi32.dll.
http://www.codeproject.com/internet/rasconnection.asp
Kuphryn
|
|
|
|
|
I wrote a program, that I installed on Win2000 in "c:\programs\myprogfolder\", logged in as administrator.
The program should create at runtime a logfile in its folder. When I run the program as normal user without admin-rights, the program can't save the logfile, cause the normal-user has no rights to this folder. Can I do something in the installation-routine, to give the program the right to save files, anyway which rights the user has, who start the prog?
Thanks for help!
Merry Christmas & Happy new Year!
Friedemann
|
|
|
|
|
Interesting.
Try setting the owner of the program to too user or to everyone.
Kuphryn
|
|
|
|
|
Hello
How can i change the fonts of Shut Down screen in windows?
"The chance of the bread falling with the buttered side down is directly proportional to the cost of the carpet." Muphy's Law
|
|
|
|
|
Hi,
Try Registry settings!
Regards,
R.Selvam
|
|
|
|
|
Hi All,
I want to add a help button to the dialog. It is a simple dialog with properties system menu and title bar set. I hope it is easy and some one of you might have done that. I tried searching on net and here and codeguru but found nothing. Please help me out.. Any help or pointers are highly appreciated..thanks a lot in advance..
regards,
Himanshu
|
|
|
|
|
|
Is it possible to call functions in a C# dll from C++ code? If so, what do I set in the build properties of the C# dll to create the .lib the C++ code needs?
|
|
|
|
|
Hi!
I created an UnManaged C++ dll in Visual7 then
added the C# assmbly with the #using Keyword.
in the UnManaged C++ dll I created some functions, which access the objects exported by the C# assembly.
the unmanaged C++ dll can be loaded by a nativ C++ Programm and access the C# Objects through the exported functions from the dll. the only bad thing is, that the C# assembly must be in the App Directory or somewhere Windows searches for a DLL.
|
|
|
|
|
Hi!
I am working on a security program for children.
this program is intended to be a child desktop, the main purpose is to lockout children from windows system.
My question is do someone know if there is a smart way to do this?
I need to filter keyboard events like ctrl +alt + del and other windows short keys and messages.
My program will be like a second desktop leting children run their own programs games etc etc.
/Jarek
He believed the commercials that said drink beer, get laid
but at closin' time he was alone, he didn't get paid.
Last night his lover was a razorblade..
"Dan Reed song Mix it up"
What do you want to patch today?
|
|
|
|
|
You will probably need to Install Keyboard Hooks
i.e. WH_KEYBOARD hook
This should get you up and Running
Click ME[^]
Live as if your were to die tomorrow. Learn as if you were to live forever.
-Mahatma Gandhi
|
|
|
|
|
First, check this: Typename, Disabling Keys in Windows XP with TrapKeys[^]
> ...the main purpose is to lockout children from windows system
I'm not quite sure if this is an option, but in WinXP you could simply add a new account and start your program instead of explorer.exe. Go to:
Start -> Run -> gpedit.msc -> Administrative Templates -> System -> Custom User Interface
This way most of the Windows hotkeys will go away for free. But two of them will stay: Ctrl-Shift-Esc and Ctrl-Alt-Del (both are intercepted by Winlogon). To get rid of them you could either disable Task Manager (gpedit.msc -> Administrative Templates -> System -> Ctrl+Alt+Del Options). If you are happy with the notification message that pops up when pressing those hotkeys thereafter, then you are all done. If not, or if you simply need complete control over those hotkeys, you have to write a replacement for msGina.dll (search for GINASTUB in MSDN as a starter example; unfortunately the sources were thrown out of MSND .NET, so you'll have to stick with the Visual Studio 6.0 version). In your custom GINA:
1) Gobble WlxStartApplication in order to disable Ctrl-Shift-Esc.
2) To handle Ctrl-Alt-Del either gobble WlxLoggedOnSAS (you get an ugly flicker) or call
DWORD dwOld;
pWinlogonFunctions->WlxSetOption( hWlx, WLX_OPTION_USE_CTRL_ALT_DEL, 0, &dwOld ); (now the screen-saver won't be started anymore).
Isn't it always true: You get something but in the same moment you lose something else.
RK
|
|
|
|