|
Deal all,
In a dialog-based application, i have detect all the cd-rom devices
successfully. Now i want to insert and eject a cd-rom.
How to insert and eject a cd-rom by using sendAspi32Command ?
Thanks in advance!
chen
|
|
|
|
|
|
Hi,
I have a 24bit BMP and want to programatically convert
it to GIF file.
How do i do that
Sameer
|
|
|
|
|
Use any of the varios graphics libraries available on the net. For one, paintlib seems a good choice.
PS: Seems paintlib does not output GIFs, probably because of the patents problems associated with this format. If you can switch to PNG then the library will serve your needs.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Joaquín M López Muñoz wrote:
If you can switch to PNG then the library will serve your needs.
Actually, I have a 24 bit BMP and I want a format, which
converts it to a Browser Compatible format and its
size is the smallest.
Wha about the size of PNGs
Sameer
|
|
|
|
|
If you're outputting synthetic images (chart diagrams, simple icons), then PNG is fine. For all other things, specially photographies, JPEG is a much better choice.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Hi all,
I have to develop a ISO9660 File System in windows NT platform.I have dowmloaded the mkisofs whihc is written mainly for UNIX.How can i use this code for windows.Also, if somebody had already worked in this code meand how can we use this code(can u explain how the exe works& how we have to give the args at command line).Is any config file used.
I tried going thro the docs for this.But, cuold not succeed in creating the file system..
TIA.
|
|
|
|
|
From your explanation it sounds like what you try to accomplish is to write an ISO-9660 image. The file system driver for it is already provided by Microsoft.
You are right that mkisofs is written mainly for *nix, but it's works almost as good on Win32 (perhaps/probably equally well is compiled under cygwin). The tiny problem is with inodes used for hashing, why recursing directory trees can be a bit strange.
As for the syntax of how you invoke mkisofs, have you read any of the docs included? Let's say you want to create an image where the "volume name" is to be "Mush" and it is to be only used on Windows why a an additional Joliet directory but no Rock Ridge directory would suffice, and that CD is to have two files "foo" and "bar" in the root, and finally the image file is to be named barf.img.
mkisofs -V Mush -J -o barf.img foo bar
|
|
|
|
|
Hi,
Thanx for the information.
I am using windows NT.I am using the earliest version 0.99 and don't want Joliet or Rock Ridege extensions.
I am facing prob with vms.c file as certain functions like opendir(),readdir() use certain unix specific functions.The code compliation gives error becos of this.
Moreover if iam having jpeg file(for forming image file) in a particular path how can i specify that in the command line.
TIA.
Y.Yamini Devi
|
|
|
|
|
Hi,
Thanx for the information.
I am using windows NT.I am using the earliest version 0.99 and don't want Joliet or Rock Ridege extensions.
I am facing prob with vms.c file as certain functions like opendir(),readdir() use certain unix specific functions.The code compliation gives error becos of this.
Moreover if iam having jpeg file(for forming image
file) in a particular path how can i specify that in the command line.
TIA.
Y.Yamini Devi
|
|
|
|
|
I am using the earliest version 0.99
Wow, that's pretty old. Last I checked it was at 1.15a22.
I am facing prob with vms.c file
LOL. Read its comment header. It's (obviously, with that name) for the operating system VMS.
But the opendir&co functions are indeed a problem. The way I solved it was to implement them myself. No big deal, just boring.
Moreover if iam having jpeg file(for forming image
file) in a particular path how can i specify that in the command line.
It's in the documentation.
|
|
|
|
|
Hi,
I am trying to create ISO9660 Image file.I awnt to create the image file for a jpeg file.I am giving the JPEG file path & name of taht JPEG file thro the comamnd line like this.
mkisofs -o outfile.iso -V TEL C:/file1.jpeg
My iso file is craeted.But, it does not contain any jpeg file data.Where am i going wrong.
TIA,
Y.Yamini Devi
|
|
|
|
|
Does anybody have any idea how to restore the file-type associations that are supposed to belong to VS6. .dsw .dsp .c .cpp .h .hpp etc. I have tried reinstalling VS6, completely removing VS6 and installing it again, and still it wont re-register the file-type associations.
I am at a loss as to what to do next.
|
|
|
|
|
I had the same problem once. It went away when I reinstalled Windows....Sorry!
Best regards,
Alexandru Savescu
|
|
|
|
|
Thanks Alexpro.
I fixed the problem by scouring the registry by hand.
Took just over an hour as opposed to the entire day it would have taken to completely reinstall the OS and all required apps. Mind you given that I spent all day yesterday in the initial attempts to fix maybe it wasnt a win.
|
|
|
|
|
Hi,
I am doing a small chatter prog, which also can send some files and so on. How do I enumerate all machines in a lan, which are currently running the chatter prog (I am thinking of a similiar enumeration like it is done in games).
tia.
-widi
|
|
|
|
|
My idea:
Anonymous wrote:
How do I enumerate all machines in a lan
You can use UDP broadcast datagram. And then
Anonymous wrote:
which are currently running the chatter prog
all your clients have to listen on selected port to that UDP datagram. They will respond somehow (like, hey, I am here ... etc.) with datagram sent to your server.
At the server side you will receive datagrams with clients' IP adresses, it means, you will have a list of all clients on your LAN.
|
|
|
|
|
tanks, i'll check it out.
-widi
|
|
|
|
|
hi friend
LPSERVER_INFO_100 pBuf=NULL;
LPSERVER_INFO_100 pTmpBuf;
DWORD dwEntriesRead = 0;
DWORD dwTotalEntries = 0;
NET_API_STATUS nStatus;
DWORD i;
nStatus = NetServerEnum(NULL, 100, (LPBYTE *) &pBuf, MAX_PREFERRED_LENGTH, &dwEntriesRead,
&dwTotalEntries, SV_TYPE_ALL, NULL, 0);
if ((nStatus == NERR_Success) || (nStatus == ERROR_MORE_DATA))
{
pTmpBuf=pBuf;
for (i = 0; i < dwEntriesRead; i++)
{
USES_CONVERSION;
LPTSTR str = OLE2T((const unsigned short *)pTmpBuf->sv100_name);
if(m_ctrlComboNetSendTo .AddString(str)==CB_ERR || m_ctrlComboProxyAs .AddString(str)==CB_ERR)
break;
pTmpBuf++;
}
}
if (pBuf != NULL)
NetApiBufferFree(pBuf);
here i use m_ctrlComboProxyAs as a control variable of type COMBO
and str is a bufferr
in the loop u get the machine name one at a time
try it
Renjith The True CP ian
|
|
|
|
|
You are right, however SV_TYPE_ALL does not necessary mean:
Anonymous wrote:
enumerate all machines in a lan, which are currently running the chatter prog
|
|
|
|
|
thanks, that's what i needed.
-widi
|
|
|
|
|
In my application I need to draw a gradient in the window non-client area. I pass a window device context to the GradientFill(…) Win32 API function. However, under WinMe gradient is drawn incorrectly, it somehow clipped. Everything is OK under Win2000 and WinXP.
I developed a dummy dialog-based example program where this bug is reproducible. The following are 2 functions of interest:
void CTestDlg::OnGradientFill()
{
CRect rect;
GetWindowRect(&rect);
// offset from screen to window coordinates
rect.OffsetRect(-rect.left, -rect.top);
// get window device context
HDC hDC = ::GetWindowDC(m_hWnd);
// draw gradient
DrawGradient(hDC, rect);
// clean up
::ReleaseDC(m_hWnd, hDC);
}
void CTestDlg::DrawGradient(HDC hDC, const CRect& rect)
{
// This code is borrowed from MSDN
// article "Drawing a Shaded Rectangle"
TRIVERTEX vert[2] ;
GRADIENT_RECT gRect;
vert [0] .x = rect.left;
vert [0] .y = rect.top;
vert [0] .Red = 0x0000;
vert [0] .Green = 0x0000;
vert [0] .Blue = 0x0000;
vert [0] .Alpha = 0x0000;
vert [1] .x = rect.right;
vert [1] .y = rect.bottom;
vert [1] .Red = 0x0000;
vert [1] .Green = 0x0000;
vert [1] .Blue = 0xff00;
vert [1] .Alpha = 0x0000;
gRect.UpperLeft = 0;
gRect.LowerRight = 1;
GradientFill(hDC,vert,2,&gRect,1,GRADIENT_FILL_RECT_H);
}
For comparison I have included to the example program a call to FillRect(…) with the same device context. Everything draws correctly both under WinMe and other systems!
Could graphics experts somehow comment on this issue? Is it a bug in the Microsoft’s implementation of the GradientFill(…) function under WinMe? I can send a demo project to those who will be interested.
My environment:
WinMe/WinXP, Visual C++ 6.0, SP5, Platform SDK August 2001
Thanks, any comments will be greatly appreciated!
Victor
|
|
|
|
|
Hi,
I have developed an application that runs on the
client machine throughout the System lifetime.
Now its like, i want to sometimes update this application
with newer versions.
Please, i want some suggestions on how to perform this
kind of activity.
Do I need to run, one more program or what?
Please help
Sameer
|
|
|
|
|
A typically used technique is that program A starts B passing to B it's process handle and then exits. B waits on the handle and keeps waiting till A exits. Then B copies the new file over the existing file and restarts A and then exits.
Nish
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
|
Nish - Native CPian wrote:
B waits on the handle and keeps waiting till A exits
Thanx for the help, but how can B wait till A exits,
I mean how to do that??
Sameer
|
|
|
|