Search Results

Search found 7 results on 1 pages for 'systemcall'.

Page 1/1 | 1 

  • System calls on Windows

    - by b-gen-jack-o-neill
    Hi, I just want to ask, I know that standart system calls in Linux are done by int instruction pointing into Interrupt Vector Table. I assume this is similiar on Windows. But, how do you call some higher-level specific system routines? Such as how do you tell Windows to create a window? I know this is handled by the code in the dll, but what actually happend at assembler-instruction level? Does the routine in dll calls software interrupt by int instruction, or is there any different approach to handle this? Thanks.

    Read the article

  • Unix System Call in Objective-C

    - by Biranchi
    Hi all, Is it possible to make system call in Objective-C? I have the following code: if (!system("ls -l")) { NSLog(@"Successfully executed"); } else { NSLog(@"Error while executing the command"); } How to get the output? Thanks

    Read the article

  • How to find which type of system call is used by a program

    - by bala1486
    I am working on x86_64 machine. My linux kernel is also 64 bit kernel. As there are different ways to implement a system call (int 80, syscall, sysenter), i wanted to know what type of system call my machine is using. I am newbie to linux. I have written a demo program. include int main() { getpid(); return 0; } getpid() does one system call. Can anybody give me a method to find which type of system call will be used by my machine for this program.. Thank you....

    Read the article

  • C++ Linux getpeername IP family

    - by gln
    hi In my Linux C++ application I'm using getpeername in order to get the peer IP. my problem is: when I enable the IPv6 on my machine the IP I got from the peer is with family IF_INET6 although it is IPv4. code: int GetSockPeerIP( int sock) { struct sockaddr_storage ss; struct socklen_t salen = sizeof(ss); struct sockaddr *sa; memset(&ss,0,salen); sa = (sockaddr *)&ss; if(getpeername(sock,sa,&salen) != 0) { return -1; } char * ip=NULL: if(sa->sa_family == AF_INET) { ip = inet_ntoa((struct sockaddr_in *)sa)->sin_addr); } else { //ip = how to convert IPv6 to char IP? } return 0; } how can I fix it? thanks1

    Read the article

  • Porting C++-code from Windows to Unix: systemcalls colliding with name of functions

    - by marvin2k
    Hi I'm porting some crufty C++ Windows-code to Linux, which uses functions called "open" and "close" inside every class... Very bad style, or? Luckily that wasn't a problem in windows, since their systemcalls are named different. When I try to call the systemcalls open() or close() I'm getting some compiler error about "no matching function for call for class:open()". I can't rename all our functions named "class::open" and "class::close" in the whole code, and I have to use open() and close() since I'm working with serial ports. So my question is: How can I tell the compiler, which open I mean? How can I escape or hide the namespace of a class in C++?

    Read the article

  • base64-Encoding breaks smime-encrypted emaildata

    - by Streuner
    I'm using Mime::Lite to create and send E-Mails. Now I need to add support for S/Mime-encryption and finally could encrypt my E-Mail (the only Perllib I could install seems broken, so I'm using a systemcall and openssl smime), but when I try to create a mime-object with it, the E-Mail will be broken as soon as I set the Content-Transfer-Encoding to base64. To make it even more curious, it happens only if I set it via $myMessage->attr. If I'm using the constructor -new everything is fine, besides a little warning which I suppress by using MIME::Lite->quiet(1); Is it a bug or my fault? Here are the two ways how I create the mime-object. Setting the Content-Transfer-Encoding via construtor and suppress the warning: MIME::Lite->quiet(1); my $msgEncr = MIME::Lite->new(From =>'[email protected]', To => '[email protected]', Subject => 'SMIME Test', Data => $myEncryptedMessage, 'Content-Transfer-Encoding' => 'base64'); $msgEncr->attr('Content-Disposition' => 'attachment'); $msgEncr->attr('Content-Disposition.filename' => 'smime.p7m'); $msgEncr->attr('Content-Type' => 'application/x-pkcs7-mime'); $msgEncr->attr('Content-Type.smime-type' => 'enveloped-data'); $msgEncr->attr('Content-Type.name' => 'smime.p7m'); $msgEncr->send; MIME::Lite->quiet(0); Setting the Content-Transfer-Encoding via $myMessage->attr which breaks the encrypted Data, but won't cause a warning: my $msgEncr = MIME::Lite->new(From => '[email protected]', To => '[email protected]', Subject => 'SMIME Test', Data => $myEncryptedMessage); $msgEncr->attr('Content-Disposition' => 'attachment'); $msgEncr->attr('Content-Disposition.filename' => 'smime.p7m'); $msgEncr->attr('Content-Type' => 'application/x-pkcs7-mime'); $msgEncr->attr('Content-Type.smime-type' => 'enveloped-data'); $msgEncr->attr('Content-Type.name' => 'smime.p7m'); $msgEncr->attr('Content-Transfer-Encoding' => 'base64'); $msgEncr->send; I just don't get why my message is broken when I'm using the attribute-setter. Thanks in advance for your help! Besides that i'm unable to attach any file to this E-Mail without breaking the encrypted message again.

    Read the article

1