|
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
|
|
|
|
|
Sameer Maggon wrote:
but how can B wait till A exits,
B should call WaitForSingleObject on A's process handle which A should pass to B
Nish
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
|
I'm using some COM components in my VC++ project, I was expecting one of those methods return "_RecordsetPtr", but it in fact returns "IDispatchPtr", I'm new on COM stuff, how to convert it into a _RecordsetPtr? Thanks a lot.
|
|
|
|
|
I had a look on Code Project but could not find what I was looking for.
Can anybody direct me to an article that covers adding a button to the title bar of an application. I want to add one next to the 'minimize' button.
Thanks - Joel
|
|
|
|
|
I don't know of one off the top of my head, but this article might give you a start.
--------
A closed mouth gathers no foot. --Shog9 --
|
|
|
|
|
this is not from code project.
But i guess it does'nt matter?
http://www.codeguru.com/dialog/custom_dialog_caption.shtml
|
|
|
|
|
would you please tell me about som win32 API which provide
accessing(Read/Write)
to FAT32 logical partion on my hard disk.
As mater of fact,I want to read or write some data from/to FAT32
partitions in
my VC++ program.
I perform it on FAT16 system with using VWIN32 services and
_DIOC_REGISTERS
but it failed on FAT32.
there is some assembly snippet code in MSDN help library,but I
couldn't compile
and run it in VC++ with __asm keyword in my code as see below
__asm{
mov si, 6001h ;write normal file data. SI=0 for read
;see "In Write Mode" below for more write
values
mov cx, -1 ;cx must be -1
mov dx, seg Buffer
mov ds, dx
mov bx, offset Buffer ;See below
mov dl, DriveNum ;See below
mov ax, 7305h ;Ext_ABSDiskReadWrite
int 21h
jc error_handler ;carry set means error
}
I got some compile error on line 3(mov dx,seg Buffer) and on line
5(mov bx,offset Buffer).
I tried it with _DIOC_REGISTERS and DeviceIoControl with VWIN32 file
handler
but i got error number 87 that means "incorrect parameters".
please help me with your advices or introduce me some useful sites to
solving this problem.
please sne it to
karimi@rcii-ir.org
|
|
|
|
|
if you declare the amount of info that you want to store in a char like...
char ID[10];
that would mean that id has 10 slots + \0; right?
now, if i would want to print out all the info from char ID... wouldnt i just..
cout << ID;?
and if you wrote:
cout << ID[2];
you would get the third memory slot, right?
why cant i set M_ID = ID? M_ID is [10] and so is ID.
bool ID::SetID(char ID[10])
{
M_ID = ID
return true;
}
i get an error when i put this in, and the only way i get rid of it is if i make:
ID[]; and within the [] i would have to have a number. but i want all of ID = M_ID.., what do i do? what do i put in the []?
also... if there is a good tutorial that teaches how to compare data, and all the little detail of do what im trying to do, please make note of it.
Thanks!
~SilverShalkin
ps... I started this message like 1-2 hours ago, and kept jumping back to my code and trying new things... so if the message is unclear about my mainpoint "question" just tell me, and i will refrase it in a more understandable way
|
|
|
|
|
A C-style string is stored in a char array, however a char array is not magically a string. You must ensure that the array is properly null-terminated. The way you do that is to always use the string functions when manipulating strings.
SilverShalkin wrote:
char ID[10];
that would mean that id has 10 slots + \0; right?
No, that declares a 10-character array. Again, it's not magically a string. It just contains 10 characters.
SilverShalkin wrote:
now, if i would want to print out all the info from char ID... wouldnt i just..
cout << ID;?
As long as ID is null-terminted, that's correct.
SilverShalkin wrote:
bool ID::SetID(char ID[10])
{
M_ID = ID;
}
That is an error because you can't assign strings (or any arrays) with =. You copy a string with strcpy() .
--Mike--
Just released - RightClick-Encrypt - Adds fast & easy file encryption to Explorer
Like the Google toolbar? Then check out UltraBar, with more features & customizable search engines!
My really out-of-date homepage
Sonork - 100.10414 AcidHelm
|
|
|
|
|
thanks!
i was using strcpy() but then switched over because things werent working... ill try it again.
Any tutorials?
Thanks again!
~SilverShalkin
|
|
|
|