Open Side Menu Go to the Top

10-14-2007 , 10:34 AM
This is for the HUD I wrote. Whenever I try to open a Absolute hand history file, whilst the client is running, I get a sharing exception. This code works with all the other clients I've come across.

try{
CFile tmpFile(fileName, CFile::modeRead | CFile::shareDenyNone );

FlushFileBuffers(tmpFile.m_hFile);

tmpFile.Seek(startAt, CFile::begin);
int sz = tmpFile.Read(pBuf, (long)length);
}
catch (CFileException *e)
{
e->Delete();
free (pBuf);
return NULL;
}

The annoying part is, I just got done writing the parser. Boring work but seems to work fine with 20k hands. I thought I was almost done with Absolute, but unless I can get some help, I can see figuring out a work-around is going to be a pain in the ass.
Annoying programming question Quote
Annoying programming question
150% up to $2,000 Welcome Bonus on CoinPoker
Join the action now
Daily Rewards • Splash Pots • CoinRaces
Annoying programming question
10-14-2007 , 11:49 AM
just an idea: what about copying the hand history file to a new folder?
Annoying programming question Quote
10-14-2007 , 01:05 PM
It looks like Absolute specifically denies sharing when it opens the hand history files, just using shareDenyNone won't allow you to access it.

I'm pretty sure there has to be a workaround though. It often happens to me that media player classic or zoomplayer cannot open a file I'm still downloading with restricted sharing, but mplayer can usually open it fine. Although it's a little bit overkill and some search on that specific subject should give you the answer, mplayer is open-source if you really can't find a solution.
Annoying programming question Quote
10-14-2007 , 01:17 PM
Quote:
just an idea: what about copying the hand history file to a new folder?
You mean to make a copy of the file from within the program and then read that? Because it's a little impractical to keep copying by hand - especially if you are multi-tabling But how do I copy it if I can't read it in the first place?
Annoying programming question Quote
10-14-2007 , 02:37 PM
Quote:
Quote:
just an idea: what about copying the hand history file to a new folder?
You mean to make a copy of the file from within the program and then read that? Because it's a little impractical to keep copying by hand - especially if you are multi-tabling But how do I copy it if I can't read it in the first place?
Yep, the only temp fix I can think of is to make a temporary copy of the file using C's system() function, eg: system("copy src temp");

Juk
Annoying programming question Quote
10-14-2007 , 03:45 PM
Thx... I did a

CopyFile(fileName, "tmp", 0);

and that seemed to work.
Annoying programming question Quote
10-15-2007 , 09:12 AM
Quote:
Thx... I did a

CopyFile(fileName, "tmp", 0);

and that seemed to work.
Strange, why don't the sharing restrictions apply to Windows itself?
Annoying programming question Quote
10-15-2007 , 10:03 AM
Quote:
Quote:
Thx... I did a

CopyFile(fileName, "tmp", 0);

and that seemed to work.
Strange, why don't the sharing restrictions apply to Windows itself?
since when did microsoft follow specifications?
Annoying programming question Quote
10-15-2007 , 12:58 PM
from my experience
"copy something.smh"
works every time because it doesn't need an access to the file.
It just copies bytes = it doesn't interfere with the file itself.
So as long as the user has "read" right he can copy it.
Annoying programming question Quote
Annoying programming question
150% up to $2,000 Welcome Bonus on CoinPoker
Join the action now
Daily Rewards • Splash Pots • CoinRaces
Annoying programming question

      
m