|
|
Up |
  |
Author: bluestarbluestar
Date: May 11, 2008 20:18
Dear Sirs:
I want to do a function, like quick format
The hdd-disk is a removable device, and i
try to use "SHFormatDrive" or DosCommand
:"W:\>format g: /Q /FS:NTFS /V:Data /Y".
But they failed to format.
When running SHFormatDrive, it pops format
dialog(I don't want to have it, just want to format
in HIDE condition). And when running
DosCommand:"format:", it would show the
message:"the device is already remove Optimization
, so it doesn't support NTFS FileSystem".
I try to use the tool:"HP USB Disk Storage Format Tool"
to run format. It works successfully.
How to do when i want to do a function,
like quick-format?
|
| |
|
| |
no comments
|
|
  |
Author: NhocNhoc
Date: May 11, 2008 16:11
I have try to use this:
AnsiString strWindowName = "Element Client";
HWND windowHandle = FindWindow(0, strWindowName.c_str());
if (windowHandle)
{
SendMessage(windowHandle, WM_SYSKEYDOWN,0x12,0x20380001);
SendMessage(windowHandle, WM_SYSKEYDOWN,0x33,0x20040001);
SendMessage(windowHandle, WM_SYSCHAR,0x33,0x20040001);
SendMessage(windowHandle, WM_KEYUP,0x12,0xc0380001);
SendMessage(windowHandle, WM_KEYUP,0x33,0xc0040001);
}
But nothing happen
If i hold ALT when that code run, i'll effect, i think maybe that code cant
force event ALT hold key down.
Can someone help me.
PS: I cant use Key_bd() because sometime i'll hide that application (not
active)
|
| |
|
| |
no comments
|
|
  |
Author: gabrielegabriele
Date: May 11, 2008 08:41
I need to convert a bitmap file to rtf hex code.. better c or c++ examples
code.
Could someone help me?
thanx
|
| |
|
1 Comment |
|
  |
Author: RajaRaja
Date: May 11, 2008 05:19
Hi All,
I am a newbie to OLE technology and started up with
http://www.relisoft.com/win32/olerant.html in which the author
presents the statement "Anybody who knows C++ can do it with their
eyes closed. So why can't you do the same in OLE? Here comes the Flaw.
You have to be able to obtain the IBar interface from the IFoo
interface using its QueryInterface. But, wait a minute, the object
FooObj that provides the implementation of all methods of IFoo,
including QueryInterface, had no clue about IBar! It could have been
created long before anyone even thought about the possibility of IBar.
So how can it provide access to IBar?
Good question. I'm not going to go into the gory details of the
aggregation hack that is supposed to solve this problem. Given the
constraints of the flawed initial design, it is a truly ingenious
hack. So is there a better design? Read on..."
Can anyone please explain what the hack is ? Any pointers to better
understanding of design as well, is appreciated.
Thanks,
Raja.
|
| |
|
no comments
|
|
  |
Author: John SmithJohn Smith
Date: May 10, 2008 12:13
I want to do a one-month-free-trial-version of my software (windows 32 bit). What
would be the best way to do it? The sofware is expected to connect to internet so
maybe it could fetch a key from dedicated server.
I am looking for pointer & ideas.
|
| |
|
4 Comments |
|
  |
Author: r_z_aretr_z_aret
Date: May 10, 2008 11:20
I know this is really a C++, not Win32 question, but I don't hang
around any C++ group, so please tolerate.
If an object is instantiated in the main thread of a program, but
allocates memory when referenced in a worker thread, should that
memory be accessible by the main thread once the worker thread ends?
Example:
I have a class (PFBitMap) that handles BMP and JPEG files. PFBitMap
uses objects in a class (PFString) that handles strings (for filename,
date stamp, etc.). When a PFBitMap object is instantiated, it
instantiates all its PFString objects.
PFString objects allocate memory dynamically (using new).
My program instantiates a few PFBitMap objects. I want to use a worker
thread when one of these objects reads a file. But I ran into problems
when the main thread tried to access the PFString objects (e.g. a date
stamp). No problems if I read files in the main thread or if I make
pre-allocate all the PFStrings.
Pre-allocating the strings seems like a good solution, but I would
like feedback.
|
| Show full article (1.38Kb) |
|
2 Comments |
|
  |
Author: Russell.AubuchonRussell.Aubuchon
Date: May 9, 2008 18:14
--
If will you elect the loyal sharp injections before Pervis does?
|
| |
|
no comments
|
|
  |
Author: BeagleBeagle
Date: May 9, 2008 11:16
Folks,
I have the following running code. Line 5 attempts to pass the DLL
handle to the running DLL code (line 8) for use in later LoadResource
calls. This code results in a "Run-Time Check Failure #0" (Ref *1).
Not sure how to resolve this other than not write this kind of code,
but it seems to me that there is a better way to get the HMODULE/
HINSTANCE of the loaded DLL from within the exported function via
win32 call. Is that possible?
Thanks,
BEA
File : call_dll.c
1 typedef void (__stdcall *PFN_ASSIGN_DLL_HAN)(HINSTANCE hDll);
2 void mycall(void) {
3 HMODULE hDll = LoadLibrary(TEXT("mydll"));
4 PFN_ASSIGN_DLL_HAN Assign_Dll_handle = (PFN_ASSIGN_DLL_HAN)
GetProcAddress(hDll, "Assign_Dll_handle");
5 Assign_Dll_handle(hMir);
...
}
|
| Show full article (1.14Kb) |
|
6 Comments |
|
  |
Author: gamenamegamename
Date: May 9, 2008 08:32
Hi,
In the *nix world, there is the command 'readelf' to figure out if an
executable contains debug symbols. Is there an equivalent command in
win32??
Tks.
-T
|
| |
|
2 Comments |
|
  |
|
  |
Author: somisomi
Date: May 9, 2008 07:47
Hi
I am finding problem with what GetDiskFreeSpaceEx returns.
GetDiskFreeSpaceEx returns below three parameters:
lpFreeBytesAvailable: the total number of free bytes on a disk that
are available to the
user who is associated with the calling thread. If per-user quotas are
being used, this
value may be less than the total number of free bytes on a disk.
lpTotalNumberOfBytes: the total number of bytes on a disk that are
available to the user who
is associated with the calling thread. If per-user quotas are being
used, this value may be
less than the total number of bytes on a disk.
lpTotalNumberOfFreeBytes: the total number of free bytes on a disk.
In our application the parameters lpFreeBytesAvailable and
lpTotalNumberOfBytes are not
returning the values considering the user-quota that is defined on the
volume.
|
| Show full article (1.72Kb) |
|
2 Comments |
|
|
|
|