• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #ifndef WIN32_LEAN_AND_MEAN
2 #define WIN32_LEAN_AND_MEAN
3 #endif
4 #undef  __CRT__NO_INLINE
5 #define __CRT__NO_INLINE
6 #include <winsock2.h>
7 #include <wspiapi.h>
8 
9 char * WINAPI
WspiapiStrdup(const char * pszString)10 WspiapiStrdup (const char *pszString)
11 {
12   char *rstr;
13   size_t szlen;
14 
15   if(!pszString)
16     return NULL;
17   szlen = strlen(pszString) + 1;
18   rstr = (char *) WspiapiMalloc (szlen);
19   if (!rstr)
20     return NULL;
21   strcpy (rstr, pszString);
22   return rstr;
23 }
24