You are not logged in.

nass

Trainee

  • "nass" is male
  • "nass" started this thread

Posts: 57

Location: Greece

Occupation: Software Engineer

  • Send private message

1

Monday, September 25th 2006, 10:58am

how to write a structure in a shared mem segment.

hi all,
i am running slackware linux and need to use some function that will
will enable me to write and read a STRUCT from a shared mem segment..
i am using open() , to open a file (and get the file descriptor fd returned), and then use mmap to get a void* file_memory pointer.

function fwrite() (from stdio.h) doesn't work cause it can write to a file (ie needs a FILE* nor a void* and casting in this case makes the executable crash), nor does write() (from unistd.h), ie the linux standard write function, that needs as input the file decriptor (int) fd instead of the (void*) file_memory pointer...

and i don't think i can use sprintf because it needs you to define the type of variable you are giving as an argument to it (%d for decimal, %f for float, %p for pointer, %s for string etc..) and i do not know how to 'define' the structure that i want to save... or am i wrong in thinking that and there is a type i can use to store my structure?
is there any other way?

thank you for your help
nass

2

Thursday, November 16th 2006, 9:17am

Do you know if this type of marketing

Hi
Do you know if this type of marketing can get you good profits and sales. I am looking of extra option. I have tried various website marketing and they work
Has any one tried Ip broadcast / or fax marketing deos it work?
One Marketing method that I am sure works and gets me many customers is Targeted email marketing;
I use this service http://www.omegaonemedia.com.
What is your experience on some of these marketing methods
The also have Targeted email campaigns and Targeted lists


Matt D
http://www.horizon-place.com