|
Hi,
In a dialog-based application, I want to read the CD-Rom data based on its sector numner. For each selected sector number
I want to show the corresponding data in a Cedit control.
But how to read the selected sector data (1024byte)?
Thanks in advance!
chen
chen
|
|
|
|
|
chen wrote:
But how to read the selected sector data (1024byte)?
You don't. CD sectors are 2048 bytes. Also this is not only Win32 specific, it's OS specific. Are you using an NT or a Win9x OS?
|
|
|
|
|
Thanks for your reply!
Yes, i used windows2000 for my programming. I really got a write
error. I want read one sector cdrom data. In fact, it is 2352 Byte.
Would you please tell me which win32 API functions can be used
for open, close, read and write the cd-rom datas at each sector?
Best Regards,
chen
|
|
|
|
|
I really got a write error.
I'd imagine you got it if you tried to write to a CD-ROM.
I want read one sector cdrom data. In fact, it is 2352 Byte.
Ahhh, you want to read RAW sector data. The Win32 API you are to use is SPTI (SCSI Pass Thhrough Interface).
You might want to have a look at CDRecord (it's GPL) and its use of akrip (I believe the latter is hosted at sf.net, but I'm not sure). Basically you'll have to go low-level, using SCSI commands passed over the SPTI interface (don't worry, ATAPI at this level is really SCSI over ATA interface so it works for both SCSI and ATA CD-ROM's).
|
|
|
|
|
hi
is someone having the code of disabling the start button on the taskbar. plz do share that.
|
|
|
|
|
Use FindWindow and find the window with classname Shell_TrayWnd. Find it's first child. This will be the start button. Call ShowWindow with SW_HIDE.
Nish
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
|
If you get this to work, PLEASE DO NOT ever distribute it to me. I would absoulutely HATE (never use again) a piece of software that did that to my system.
Good luck,
Bill
|
|
|
|
|
Where should i load the VBScript object from?
rechi
|
|
|
|
|
What are you trying to achieve, do you want to run VB Scripts from your application? You need to do a search for Windows Scripting Host.
Michael
|
|
|
|
|
Hi,
Does anybode know how to force WInInet to send HTTP/1.0 request ? I tried to use HttpOpenRequest(m_connection,"POST",object,TEXT("HTTP/1.0"),NULL,....)
call to make HTTP/1.0 request. But when i look into request, IE 5.0 (i didn't tes another version) is sending HTTP/1.1. I also tried to use InternetSetOption / INTERNET_OPTION_HTTP_VERSION to set HTTP version to 1.0, but it has no effect.
The second (bug?) is that when i send HTTP/1.1 request to the server, while reading response with InternetReadFile(), This function sometimes hangs during receiving last packet of chunked response. Wininet callback functions is sending infinite number of events INTERNET_STATUS_RECEIVING_RESPONSE followed by INTERNET_STATUS_RESPONSE_RECEIVED with data length 0 bytes. InternetReadFile() does not stop even if i try to InternetClose() request, connnection and session handle from another thread. This bug is the reason why I need to send HTTP/1.0 request, to avoid this bug.
Can somebody who has experience with this help me, please ?
|
|
|
|
|
Is there any way to get MFC print preview functionality in an SDK application ?. If not How to implement print preview functionality in SDK application
|
|
|
|
|
Is there any way to get MFC print preview functionality in an SDK application ?. If not How to implement print preview functionality in SDK application
|
|
|
|
|
Ive seen that some programs can start when users click a hyperlink in the web browsers.
such as gametiger and teamspeak.
'Added URL recognition for websites for launching
'TeamSound (TS:\\10.4.5.100:Offense).
How could this be done in c++??
|
|
|
|
|
any ideas.
need help plz.
|
|
|
|
|
Hi,
I have a MFC based dynamically linked dll.In dllmain()'s DLL_PROCESS_ATTACH part i have written
if (!AfxWinInit(GetModuleHandle(NULL), NULL,
::GetCommandLine(), 0))
{
printf("Couldn't initialize MFC!\n");
return 0;
}
After this i have AfxMessageBox("my msg");
But messagebox() is never been displayed.
I had build the project i release mode.The OS i work on WINDOWS ME.
Regards
Neha
|
|
|
|
|
MFC DLLs provide their own entry point, so you're not supposed to write one yourself. If you plan to write a DLL with MFC support, I'd suggest you start with a fresh MFC DLL created by the app wizard and then move your code there.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
I have a dialog base application,I want to change the caption of my dialog somewhere in my program,How can I do it?
Thanks
Mazy
"The more I search, the more my need
For you,
The more I bless, the more I bleed
For you."The Outlaw Torn-Metallica
|
|
|
|
|
With SetWindowText . You should use this method only when the window has been created (i.e. if you do it right after creating the CDialog object, it will fail.)
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Joaquín M López Muñoz wrote:
With SetWindowText. You should use this method only when the window has been created (i.e. if you do it right after creating the CDialog object, it will fai.)
Thats exactly my problem.I do it on OnInitDialog() and it failed.I wanna to write the username that login in computer in the caption place,So I think I have to do it in OnInitDialog() .
Now how can I do it?
Mazy
"The more I search, the more my need
For you,
The more I bless, the more I bleed
For you."The Outlaw Torn-Metallica
|
|
|
|
|
OnInitDialog is a fine place to change the caption. Just make sure you're doing it after calling the base class method CDialog:OnInitDialog .
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Joaquín M López Muñoz wrote:
OnInitDialog is a fine place to change the caption. Just make sure you're doing it after calling the base class method CDialog:OnInitDialog.
Hello Joaq,
That doesn't matter. You can call SetWindowText before calling CDialog:OnInitDialog. The title gets changed!
Nish
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
|
Hi Nish!
Oh, didn't tested that. I supposed that could be the problem, since otherwise it should work without a problem.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Joaquín M López Muñoz wrote:
Oh, didn't tested that. I supposed that could be the problem, since otherwise it should work without a problem
I just created a sample app and tested it out. It doesn't matter whether you call SetWindowText() before or after the call to the base class.
I guess his problem lies elsewhere
Nish
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
|
Thanks Joaquín.
Mazy
"The more I search, the more my need
For you,
The more I bless, the more I bleed
For you."The Outlaw Torn-Metallica
|
|
|
|
|
Mazdak wrote:
I do it on OnInitDialog() and it failed
That's puzzling! It should work fine from OnInitDialog(). In what way is it failing? Are you getting an assert? Or did the old title still come up?
Nish
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|