ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

putenv.c
Go to the documentation of this file.
00001 /*
00002  * COPYRIGHT:   See COPYING in the top level directory
00003  * PROJECT:     ReactOS system libraries
00004  * FILE:        lib/crt/??????
00005  * PURPOSE:     Unknown
00006  * PROGRAMER:   Unknown
00007  * UPDATE HISTORY:
00008  *              25/11/05: Added license header
00009  */
00010 #include <precomp.h>
00011 
00012 /* misc/environ.c */
00013 int SetEnv(const wchar_t *option);
00014 
00015 /*
00016  * @implemented
00017  */
00018 int _putenv(const char* val)
00019 {
00020    int size, result;
00021    wchar_t *woption;
00022 
00023    size = MultiByteToWideChar(CP_ACP, 0, val, -1, NULL, 0);
00024    woption = malloc(size* sizeof(wchar_t));
00025    if (woption == NULL)
00026       return -1;
00027    MultiByteToWideChar(CP_ACP, 0, val, -1, woption, size);
00028    result = SetEnv(woption);
00029    free(woption);
00030    return result;
00031 }

Generated on Mon May 28 2012 04:36:31 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.