|
Thanks Guys
|
|
|
|
|
Bob X wrote: Is there any way to make a string accept two words separated by a space?
don't confuse NULL with Space... NULL terminate String and SPACE actually defined as Char(32)
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
actually, i wanted to send multibytes to the machine, like 02 00 02 00 20 42 51 08 to a function through which we could send this data to a machine, but i am able to send one byte at a time, how is it possible to send all the bytes at a time to a function?
shrin
|
|
|
|
|
Use the send() function on one end and recv() on the other.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
could you please give me detail idea on this..
|
|
|
|
|
See these:
recv[^]
send[^]
example[^]
sockets[^]
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Is this for win32 platform??
|
|
|
|
|
Check the bottom of the first two links. There it will show the requirements.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
|
when my list view control (report mode)
has too few items the vertical scrollbar
is disappearing. i looked through these
MSDN pages
List-View Window Styles
Extended List-View Styles
Window Styles
Extended Window Styles
but i didn't find a style helping me
to make the scrollbar stay.
i'm using plain winapi, no MFC, no WTL.
does anybody know how to solve this?
thanks in advance, sebastian
-------------------------------------------
My website: http://www.hartwork.org
-- modified at 13:09 Friday 24th February, 2006
|
|
|
|
|
I looked into this myself last week and determined that the only way to do it is to set the owner drawn flag and start overriding things, it was too much bother so I gave up.
You'd think that with all the extended styles M$ have added they would have given a LVS_EX_DISABLENOSCROLL, like with standard list boxes.
|
|
|
|
|
SetScrollInfo doesn't seem to help either.
even GetScrollInfo fails.
please let me know if you find a way to make it work.
best regards, sebastian
-------------------------------------------
My website: http://www.hartwork.org
|
|
|
|
|
I still don't know how to achieve this.
Any help is very appreciated!
Thanks in advance, Sebastian
|
|
|
|
|
I would like to be able to terminate a worker thread(for example, if it is in an endless loop)in such a way that the worker thread can clean up before terminating. I've thought that one way might be to cause an exception that the worker thread can catch. Is there a way for one thread to force an exception in another thread in the same process?
|
|
|
|
|
See here.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Thanks for the informtaion. Unfortunately, the programs that the worker threads are running are not mine, so I cannot make any modifications to them to check for thread status.
I'm wondering if it is possible to pause the worker thread, change the EIP register to point to my own code, and then resume the thread so that an exception is raised. I would like to do something that is reasonably standard so that I don't have to rewrite the code for 64 bit processors.
|
|
|
|
|
You shouldn't have to make any changes to the program that the secondary thread is spawning. The termination of a thread is a cooperative effort between the primary and secondary threads. If the secondary thread, in turn, needs to notify the program that it spawned, it can do so via SendMessage() or PostMessage() .
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Hi,
In a class I receive a pointer to a structure, I want to find out how many variables, has this structure and also what are their types or sizes!
Somehow silly, I know. just curious to know if it is possible.
I receive the pointer as (void*), and need to place it's data in to 'a part of memory'with the same size as the structure!! then use each data separately!! ;P
example:
struct x {
int a;
int b;
}
<code>
struct x aVar;
read (&aVar);
...
...
</code>
void read(void* st)
{
int nVal_cnt = ? ;
int val1_size = ? ;
}
//This is not a signature
while (I'm_alive) {
printf("I Love Programming");
}
-- modified at 6:15 Saturday 25th February, 2006
|
|
|
|
|
i think you didn't really get the point with structures.
a struct is only a scheme of how will be filled the memory of an instance of this type...
a struct don't have a variable number of variables nor types...
they are fixed when you define this type.
and note that a speak of type !!
if you define this :
struct T {
int a;
int b;
};
then T is not a variable, but a type !!!!!!
after that only, you can use it tyo create variables :
T var;
var.a = 2;
var.b = 5;
do you get me ?
TOXCCT >>> GEII power [toxcct][VisualCalc 2.24][3.0 soon...]
|
|
|
|
|
Modified
I think I was not able to say what I want correctly.
I understand the diffrence between a type and a variable.
I want to find out some information from a variable defined from a structure.
In my example I defined a type x, now consider the variable 'struct x aVar' , now if I receive a pointer to this variable(&aVar ), how can I find out some information about it? number of it's elements.
Is it clear or I failed again?;P
P.s.
In my old example: "void read(void* st) " is a function declaration receiving a pointer to a variable of the type struct x.
//This is not a signature
while (I'm_alive) {
printf("I Love Programming");
}
-- modified at 11:07 Friday 24th February, 2006
|
|
|
|
|
Hamed Mosavi wrote: Is it clear or I failed again?
not sure to understand yet, but i'll give it a try again
do you mean that "how to access to the members of a struct variable when you have a pointer on it" ?
if yes, you have 2 way :
as when you use the variable directly (no pointer), you use the . operator, you can do the same there :
struct T& var;
(*var).a = 5;
(*var).b = 12;
the other way is to use the -> operator :
struct T& var;
var->a = 5;
var->b = 12;
now, if i'm still wrong, tell me again
TOXCCT >>> GEII power [toxcct][VisualCalc 2.24][3.0 soon...]
|
|
|
|
|
you don't understand his question.
he wants to know if a function only receives a void* he can do a memcopy ( or something similar ) to a known structure.
for example
void f( void* data )
{
int iSize = SizeOf(data);
int iCountVar = NumberOfMembers( data );
}
all this without knowing what data is.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
Mr. Toxcct:
Thankyou very much for your attention.
But I'm not that much begginer
I am writing a class, it has a function that receives a pointer to an unknown structure. The class does not know what type of a structure, with how many data elements will be received.
I was thinking that if I have a pointer to a structure in the memory, and type or size of the first element, using sizeof I'll be able to get next elements.
if for example size of the first element = 2Bytes and st is the pointer, sizeof(st+2) will give me the second element size. I'll read from st+2 as much as this size, and I have the next variable.
I then thought that C, C++ compiler will save information about every variable in memory, so I might find an easier way to it.
now, Am I still failing? please say no!!
Thank you very much again
//This is not a signature
while (I'm_alive) {
printf("I Love Programming");
}
|
|
|
|
|
oh
no, actually, void* is simply an address, and the compiler don't know what is stored there (because it can change at any time at runtime...
but aren't template a bit what you're looking for ?
TOXCCT >>> GEII power [toxcct][VisualCalc 2.24][3.0 soon...]
|
|
|
|
|
I never read templates seriously.
But, I think not!
I am going to save this structure to a file!!
Modefied
In fact you're right about void*, but think about the fact that this pointer actually refers to a place in the memory that compiler know it's identity!
I think this is similar to 'explicit linking'(if I'm right about the english term)! when compiler doesn't know about it at compile time, but does so at run time.
End Modefied
any way thank you very much.
It was your kindness to pay attention.
//This is not a signature
while (I'm_alive) {
printf("I Love Programming");
}
-- modified at 12:01 Friday 24th February, 2006
|
|
|
|