comp.os.mswindows.programmer.win32
  Home FAQ Contact Sign in
comp.os.mswindows.programmer.win32 only
 
Advanced search
December 2007
motuwethfrsasuw
     12 48
3456789 49
10111213141516 50
17181920212223 51
24252627282930 52
31       1
2007
 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
  ReadFile return SUCCESS and no of bytes written is correct but data is all nulls ?         


Author: santoshsurisetty
Date: Dec 3, 2007 12:33

Hi,

I have some DOS legacy applications ( No code available for this)
accessing windows network file (say, test.dat) to write data. Many of
these application write data in this file exclusively. A windows
application (MFC, source available) reads this test.dat file. To read
this file, I have used ReadFile(..) function. This function sometimes
return success and if byte length is checked it is exact number of
bytes requested but data is all NULLs. This problem i found when i
try
to read repeatedly last record before the end of file while other
applications are writing records into it.

for example, File Lenght=2000/Current position=1900, at this position
it is showing this behaviour. record lenght is 100bytes.

Can anybody help me with your ideas for this behaviour, please?

Thanks in advance

San
no comments
  Can I temporarily elevate my program?         


Author: Chris Shearer Cooper
Date: Dec 3, 2007 08:16

Sorry, this is the first day I've been trying to understand Vista security,
so I'm probably going to ask a lot of questions using the wrong jargon
(grin) ...

The situation is this. I have an MFC application under Visual C++ 6.
Porting it to a newer version of Visual Studio is not an option, I tried and
it required so many changes to the app to get it to compile that the QA
department (correctly) said these changes would require a complete QA cycle
of every single feature, and we don't have time for that right now.

The program is composed of several EXEs, and one of the feature it has is
automatic updating, where it downloads a new EXE from our web site (with
appropriate security) and then overwrites the installed EXE. Under XP this
works fine (obviously no EXE tries to overwrite itself).

Vista of course assumes my application is a virus and puts the kibosh on the
whole automatic update thing.

As I've been reading up on this, I'm wondering if I need to create a
manifest. But then I'm not sure what to put in it ... 95%% of the time, the
program won't be automatically updating itself, so I don't want the
obnoxious Vista "Oh my God somebody is trying to run an application! Shall
I kill it?" message popping up every time users run my application.
Show full article (1.49Kb)
7 Comments
  MCI window - sound hangs         


Author: Gernot Frisch
Date: Dec 3, 2007 08:02

My code seems to play the mp3 for a second, but then it scatters and
stops. When I insert a Sleep(3) at commented part, it works.
What's wrong here?

(fully featured working example ahead, just replace the MP3_FILE name)

### -start code- ###

#include
#include
#pragma comment(lib, "VFW32.lib")

#define MP3_FILE "C:\\music.mp3"

HINSTANCE hInst; // Aktuelle Instanz

LRESULT CALLBACK __WndProc_(HWND hWnd, UINT message, WPARAM wParam,
LPARAM lParam)
{
switch (message)
{
case WM_ERASEBKGND:
return 1;
case WM_CLOSE:
DestroyWindow(hWnd);
PostQuitMessage(0);...
Show full article (2.47Kb)
3 Comments
  printing a html file         


Author: gshetty
Date: Dec 3, 2007 00:42

Hi,

I am printing a local html file using ShellExecuteEx.It works fine as
long as Internet Explorer is the default browser. But when Firefox is
set as the default browser i get a message saying "This file does not
have a program associated with it to perform this action. Create an
association in folder options control panel". What can i do to solve
this problem?

Thanks,
gshetty
1 Comment