comp.os.mswindows.programmer.win32
  Home FAQ Contact Sign in
comp.os.mswindows.programmer.win32 only
 
Advanced search
May 2008
motuwethfrsasuw
   1234 18
567891011 19
12131415161718 20
19202122232425 21
262728293031  22
2008
 Jan   Feb   Mar   Apr 
 May   Jun   Jul   Aug 
 Sep   Oct   Nov   Dec 
2008 2007    
total
comp.os ... win32 Profile…
RELATED GROUPS

POPULAR GROUPS

more...

 Up
  Detect USB drive, Memory Stick and SD/MMC in Windows         


Author: sengupta.amit
Date: May 28, 2008 23:21

Using DeviceIoCtl is it possible to distinguish between a memory
stick, an SD/MMC card and a pen drive all on the USB bus?
I have an application in vc++ which is able to identify usb devices
but is unable to isolate a pendrive from the devices. Ideally the app
needs to locate all USB drives which have a read/writable filesystem.

Thanks in advance.
4 Comments
  GDI+ Image::Save() function returns InvalidParameter         


Author: shaji
Date: May 28, 2008 22:14

HI,
I'm developing a module to save images extracted from DICOM files as
JPEG images.
I have successfully extracted the data from DICOM and now want to save
this data as JPEG file.
For this I've written the following piece of code. Here, to my utter
despair, the Save() function fails with InvalidParameter. In fact,
even before calling the Save function, when I view the oImage object
in quick view, the lastResult parameter is shown as InvalidParameter.

Is'nt this the correct way to create an Image object?

The call to Write function on the IStream is success and the required
number of bytes are written into the stream.
The image is a MONOCHROME2 one and is in raw pixel data form.

Could anybody tell me what I do incorrectly here? (I'm using VS 2005
on WinXP SP2.)

CoInitialize( NULL );
Show full article (1.63Kb)
1 Comment
  DDK console build problem?         


Author: Kevin
Date: May 28, 2008 13:24

Is there such a thing as a console windows driver?

I copied the bindview example, and I was hoping to make a console
project that
did similar actions so I can feed command-line arguments to it.

At any rate, I changed the sources file as follows:
UMTYPE=windows => console
UMENTRY=winmain => main

I ripped out all of the source files but the one I want to make and
just put:
int __cdecl main(int argc, char* argv[])
{
int lnReturnValue = 0;
printf("Hello world!\n");

return (lnReturnValue);
}

Nothing happens, so I google, and find I need to do the following:
#include
Show full article (2.19Kb)
1 Comment
  Debug assertion error using a DLL in an .exe program         


Author: Amy
Date: May 28, 2008 12:22

Hello,

I am not a programmer and an absolute novice to DLLs, but need some
urgent help. I want to use a DLL in an exe program but get an error
called as "Debug assertion error". Here is some background of the DLL
being used.

The structure of the code is as follows:

#include
............
............
extern "C"
{ void __declspec(dllimport) RESULT __stdcall A(...);
void __declspec(dllimport) RESULT __stdcall B(...);
void __declspec(dllimport) RESULT __stdcall C(...);
void __declspec(dllexport) __stdcall D(...);
}

void __declspec(dllexport) __stdcall D(...)
{
.....
}
Show full article (1.18Kb)
1 Comment
  LoadLibraryEx from ActiveX OCX Control         


Author: Beagle
Date: May 28, 2008 10:50

Folks,

I am trying to perform a LoadLibraryEx for a DLL from my OCX's
COleControl subclass, and finding GetLastError "126 The specified
module could not be found." The DLL is in the same subdir as the OCX
file, but am finding the search is not including this, but the ActiveX
Control Test Container pid instead (Image Name tstcon32.exe). How can
I get LoadLibrary to succeed without hard coding a path? This needs to
resolve during runtime. I have the ActiveX control's HINSTANCE, so I
ought to be able to resolve the right path from that, or the control's
registry entry, but seems there should be an easier way.

Thanks,
BEA
1 Comment
  Impersonation         


Author: Rasheed
Date: May 28, 2008 09:44

Hi
i have to log on remote machine with Remote machine local user
Account. means i need Impersonate.
so i have written the below code but its not working as per the
expectation:

i need to a access shared folder on a network.

what i had done is

if(domain.length() > 0) // Domain name was specified
bLoggedOn = LogonUser(userName.c_str(), domain.c_str(),
password.c_str(),
LOGON32_LOGON_INTERACTIVE ,
LOGON32_PROVIDER_DEFAULT, &userToken_);
else
bLoggedOn = LogonUser(userName.c_str(), domain.c_str(),
password.c_str(),
LOGON32_LOGON_NEW_CREDENTIALS,LOGON32_PROVIDER_DEFAULT,
LOGON32_PROVIDER_WINNT50,&userToken_);
Show full article (2.12Kb)
1 Comment
  Software Limitation (in days)         


Author: CAHEK
Date: May 28, 2008 08:12

Hi all! I'm novice in software developement and I would ask u the way
how to limit my software for 15 days for exemple.
1 Comment
  File systems (FAT32) question         


Author: Andrew Falanga
Date: May 28, 2008 07:24

Hi,

I'm not exactly sure where to ask this so I'm starting here. The
question is simple. Does the FAT system (in my case, specifically
FAT32) store size and physical size information for a directory? The
file I'm reading from can be found here: http://staff.washington.edu/dittrich/misc/fatgen103.pdf.
From page 22 of this document, "A FAT directory is nothing but a
ā€œfileā€ composed of a linear list of 32-byte structures." (A
definition of this structure can be found on page 23.)

I haven't found anything definitive yet, but I'm thinking that the
answer is no. While size, physical size and such are recorded for
files, it doesn't appear that this is the case for directories. Can
anyone here verify that this is true or false?

Thanks,
Andy
2 Comments
  Closing a file handle in parent         


Author: Subrahmanya
Date: May 28, 2008 06:23

Hi All

A process spawns another process and it inherits all the parent
process handles. While the child process is existing if parent process
closes a file handle will the corresponding handle be accessible in
child process or this gets closed automatically (on windows). I am
writing a program in C++ where I want the corresponding handle in
child process also be closed. If the handle does not get closed in
child process automatically is there any other way to close the child
process handle forcefully?

Thanks in advance
Subrahmanya
1 Comment
  How Can I identify a memory Leak         


Author: ManicQin
Date: May 28, 2008 06:03

Hello all.
I'm trying to identify a memory leak, I dont mean that I'm trying to
Fix a memory leak only to prove there is one.
The most common answer is to look at the mem usage in Task Manager or
using the perfmon to monitor the private bytes, But those tools are'nt
accurate
(and it's easy to prove just allocate(new) a buffer and delete[] him,
and you'll see that the memory usage wont change nor the private
bytes).
Another answer is to use Bounds Checker and other third party
applications but I only intrested in identifying the leak and not
finding the source of the leak.
Can you think of any methods for doing it?

Thanks
7 Comments