|
Dominik Reichl wrote:
Q228930 - How to Replace Currently Locked Files with Inuse.exe
http://support.microsoft.com/support/kb/articles/q228/9/30.asp[^]
This works on NT and Win2k.
This looks interesting thanks, the only trouble is, I need full 95, 98, and ME compatability aswell. Hmmm, I'll see if it works.....
[Edit]small>Dominik Reichl wrote:
Deleting Locked Files
http://www.codeguru.com/files/ForceDel.shtml[^]
It's about deleting locked files, but the article explains how to unlock locked files. You unlock the files and replace with your own.
While this may work perfectly well, I'd like to find the method installshield uses. Also judging from the comments, this may not work 100% of the time. Ahh well.
Thanks
I feel like I'm diagonally parked in a parallel universe
Jeremy Davis
http://www.astad.org http://www.jvf.co.uk
|
|
|
|
|
Have a look at this article:
http://anticrack.p15106404.pureserver.info/modules.php?op=modload&name=News&file=article&sid=3196&mode=&order=0&thold=0[^]
Various ways are described on how to delete locked/inuse files.
NT-BASED SYSTEMS
You can use the MoveFileEx method with parameter MOVEFILE_DELAY_UNTIL_REBOOT.
Win95, Win98, WinME
Use Wininit.ini and add lines like
DestinationFileName=SourceFileName
to the [rename] section. Read MSDN page on "MoveFileEx" (bottom of page) for more information.
-Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
|
|
|
|
|
|
Copy the updated files into your private setup folder
and on NT use MoveFileEx with
MOVEFILE_DELAY_UNTIL_REBOOT|MOVEFILE_REPLACE_EXISTING
or WritePrivateProfileString to add
them to the Rename section of WININIT.INI on Win 9x.
Make sure to update the SharedDLLs counts in the
registry too.
|
|
|
|
|
Brilliant, thanks!! Just what I was looking for!! I had seen the command somewhere before, but just couldn't remember it!!
I feel like I'm diagonally parked in a parallel universe
Jeremy Davis
http://www.astad.org http://www.jvf.co.uk
|
|
|
|
|
I am trying to run a program with Borland C++ v5.02 but I get a message 'abnormal program termination' at the point where I use a 'new' operator to declare memory for a class' pointer.I found that v3.1 had problems with the 'new' operator and you needed to run a batch file to correct it.I tried that but it didn't work for v5.02.Do you know anything about that? Thank you very much for your help.
|
|
|
|
|
I am writing a machine vision application that must process 5000 frames per second from a high-speed camera. I am writing in unmanaged C with Visual C++.NET.
I have to find the bottlenecks in my code. As far as I can tell from the VS.NET documentation, the only performance analysis tools that ship with VS.NET are for profiling distributed web applications and are not suitable for fine-grained source-profiling of unmanaged code.
Is there any way to profile the source code with Visual Studio.NET or do I have to slip back to Visual Studio 6.0?
Why couldn't Science, in the long run, serve
As well as one's uncleared lunch-table or
Mme X en Culottes de Matador? James Merrill
|
|
|
|
|
http://nprof.sourceforge.net/[^] or the .NET profiler at Numega that is free .
Cheers,Joao Vaz
And if your dream is to care for your family, to put food on the table, to provide them with an education and a good home, then maybe suffering through an endless, pointless, boring job will seem to have purpose. And you will realize how even a rock can change the world, simply by remaining obstinately stationary.-Shog9
Remember just because a good thing comes to an end, doesn't mean that the next one can't be better.-Chris Meech
|
|
|
|
|
Thanks, but as I wrote, my application does not use .NET. It's a native, unmanaged executable. All I seem to find are .NET profilers when what I want is something to profile native code.
|
|
|
|
|
http://www.compuware.com/products/devpartner/profiler/[^]
The numega free community edition profiler suports profiling native vc++ , check the link to download it
Cheers,Joao Vaz
And if your dream is to care for your family, to put food on the table, to provide them with an education and a good home, then maybe suffering through an endless, pointless, boring job will seem to have purpose. And you will realize how even a rock can change the world, simply by remaining obstinately stationary.-Shog9
Remember just because a good thing comes to an end, doesn't mean that the next one can't be better.-Chris Meech
|
|
|
|
|
Thanks. That's just what I needed.
Why couldn't Science, in the long run, serve
As well as one's uncleared lunch-table or
Mme X en Culottes de Matador? James Merrill
|
|
|
|
|
Hi,
I wish to disable the Horizontal scroll bar from appearing in my custom control subclassed from CListCtrl.
I am using:
// Retrieves the scroll bar information
SCROLLINFO si;
m_ListCtrlObject.GetScrollInfo(SB_VERT, &si);
// Hides the scroll bar by playing with its values
// Hide it by setting the min=max-0
//si.fMask = SIF_RANGE;
si.nMin = 0;
si.nMax = 0;
// Sets the scroll bar info, remove the annoying horizontal scroll bar
m_ListCtrlObject.SetScrollInfo(SB_HORZ, &si, TRUE);
But it does not seem to work for me. Any ideas?
|
|
|
|
|
Sorry, I did not make myself clear.
What I wanted was to have the horizontal scrollbar completely removed, ie it will never appear, not even appearing as the greyed out disabled scroll bar.
|
|
|
|
|
|
Hey guys,
I am trying to add a member into a group. A user and a group already
exists, but if I call this function, I get the system error code 1376:
The specified local group does not exist.
I recognized that if I call this function after creating a user it
success.
So what can I do here ???
see my code:
<br />
USES_CONVERSION;<br />
wchar_t *pswzGroup = T2W("A");<br />
wchar_t *pswzUser = T2W("X");<br />
<br />
LOCALGROUP_MEMBERS_INFO_3 localgroup_members;<br />
localgroup_members.lgrmi3_domainandname = pswzUser;<br />
<br />
nStatus=NetLocalGroupAddMembers(NULL,pswzGroup,3,(LPBYTE)&localgroup_members,1);<br />
<br />
if(nStatus == NERR_Success) return "Groups(s) added succesfully to the<br />
group.\r\n";<br />
if(nStatus == ERROR_ACCESS_DENIED) return "Access denied.\r\n";<br />
if(nStatus == NERR_GroupNotFound) return "The user does not have<br />
access to the requested information.\r\n";<br />
if(nStatus == ERROR_NO_SUCH_MEMBER) return "One or more of the members<br />
specified do not exist. Therefore, no new members were added.\r\n";<br />
if(nStatus == ERROR_MEMBER_IN_ALIAS) return "One or more of the<br />
members specified were already members of the local group. No new<br />
members were added.\r\n";<br />
if(nStatus == ERROR_INVALID_MEMBER) return "One or more of the members<br />
cannot be added because their account type is invalid. No new members<br />
were added.\r\n";<br />
else{<br />
CString str;<br />
str.Format("Error->Code: %d\r\n",nStatus);<br />
return str;<br />
}<br />
thanks, sonu
da sonu
|
|
|
|
|
Hi All,
I need to create an entry in the Visual C++ project options. Upon selecting this option the programmer would get a ready made template of our project with all the predefined methods, their return value and their parameters. The programmer would have to just add the code he wants it to perform in the specified space. Similar to what ATL does it for COM development. How do I add such a option in the VC++ environment. Where do I store the template specs. Kindly help me out in this.
Thanks,
Abhishek.
Learning is a never ending process of Life.
|
|
|
|
|
If you are using .NET, files in the folder ...\Microsoft Visual Studio .NET/Vc7/vcprojectitems show up in the "New Item" template list. I'm not sure if this is the "right" way to do it, but it works. If anyone knows the "right" way, let me know.
|
|
|
|
|
dear all,
how can i check the flag values which r set in a variable, say lParam in WM_QUERYENDSESSION.
i know i have to use & operator, but i'm not getting the results.
actually i want to detect windows shutdown and restart and take 2 different actions based on the 2 condition (restart and shutdown).
so how can i differtiate between a system shutdown and system restart.
this problem is getting to my head!
regards
|
|
|
|
|
long nAction;
if (lParam == 0)
nAction = SHUTDOWN;
else
if ((lParam & ENDSESSION_LOGOFF) == ENDSESSION_LOGOFF)
nAction = LOGOFF;
else
nAction = RESTART;
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Just like Windows Media Player itself can do?
Thanks
JW
DJ
|
|
|
|
|
Hello,
I have an assignment I am working on, I am stuck at a beggining point. Below is the code I am working with. This is pretty much what the professor gave us to start with, all I am trying to do right now is pass some values to the subroutine and then print them in the subroutine to confirm the values passed. We have to pass by value. I can print the values in the main fine, but then I always get zeroes in the subroutine. I have a lot more to do in the assignment, but have been stuck here. Any help would be greatly appreciated.
Thanks,
Paul
unsigned long adddouble(unsigned long x, unsigned long y)
{
printf("%ld %ld \n", x, y);
return(x+y); /* no interest at this time */
}
main()
{
double d1, d2, *dp;
unsigned long *longp1,*longp2, s;
scanf("%lf %lf", &d1, &d2); /* get two input real numbers */
printf("%lf %lf \n", d1, d2);
longp1 = (unsigned long *) &d1;
longp2 = (unsigned long *) &d2;
s = adddouble(*longp1,*longp2);
}
|
|
|
|
|
longp1 = (unsigned long *) &d1;
longp2 = (unsigned long *) &d2;
this is not good.
what you're doing here is setting a pointer to a long to point to the place where a double lives.
i don't really see why you need to use pointers for any of the longs. try it without.
-c
Image tools: ThumbNailer, Bobber, TIFFAssembler
|
|
|
|
|
Take it from a veteran...
Avoid casting whenever possible, even when you know what you are doing. Casting has always been and will always be a potent source of bugs.
|
|
|
|
|
I'm writting a client program that lock the keyboard, mouse until the server unlock it. How can I do that on Windows 9X, and Windows NT/2000/XP?
How can I prevent CTRL+ALT+DEL, ALT+TAB... and hide my client from task list?
Thanks for any idea.
|
|
|
|
|
wow, that would make a nice virus;)
Later, JoeSox www.joeswammi.com It's not easy facin' up when your whole world is black Rolling Stones
|
|
|
|