Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
38b14b4c
Commit
38b14b4c
authored
Jan 24, 2005
by
Eric Kohl
Committed by
Alexandre Julliard
Jan 24, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement MyFree, MyMalloc and MyRealloc.
parent
0a2f7e20
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
97 additions
and
3 deletions
+97
-3
Makefile.in
dlls/setupapi/Makefile.in
+1
-0
misc.c
dlls/setupapi/misc.c
+93
-0
setupapi.spec
dlls/setupapi/setupapi.spec
+3
-3
No files found.
dlls/setupapi/Makefile.in
View file @
38b14b4c
...
...
@@ -13,6 +13,7 @@ C_SRCS = \
dirid.c
\
diskspace.c
\
install.c
\
misc.c
\
parser.c
\
queue.c
\
setupcab.c
\
...
...
dlls/setupapi/misc.c
0 → 100644
View file @
38b14b4c
/*
* Setupapi miscellaneous functions
*
* Copyright 2005 Eric Kohl
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "winuser.h"
#include "winreg.h"
#include "setupapi.h"
/**************************************************************************
* MyFree [SETUPAPI.@]
*
* Frees an allocated memory block from the process heap.
*
* PARAMS
* lpMem [I] pointer to memory block which will be freed
*
* RETURNS
* None
*/
VOID
WINAPI
MyFree
(
LPVOID
lpMem
)
{
HeapFree
(
GetProcessHeap
(),
0
,
lpMem
);
}
/**************************************************************************
* MyMalloc [SETUPAPI.@]
*
* Allocates memory block from the process heap.
*
* PARAMS
* dwSize [I] size of the allocated memory block
*
* RETURNS
* Success: pointer to allocated memory block
* Failure: NULL
*/
LPVOID
WINAPI
MyMalloc
(
DWORD
dwSize
)
{
return
HeapAlloc
(
GetProcessHeap
(),
0
,
dwSize
);
}
/**************************************************************************
* MyRealloc [SETUPAPI.@]
*
* Changes the size of an allocated memory block or allocates a memory
* block from the process heap.
*
* PARAMS
* lpSrc [I] pointer to memory block which will be resized
* dwSize [I] new size of the memory block
*
* RETURNS
* Success: pointer to the resized memory block
* Failure: NULL
*
* NOTES
* If lpSrc is a NULL-pointer, then MyRealloc allocates a memory
* block like MyMalloc.
*/
LPVOID
WINAPI
MyRealloc
(
LPVOID
lpSrc
,
DWORD
dwSize
)
{
if
(
lpSrc
==
NULL
)
return
HeapAlloc
(
GetProcessHeap
(),
0
,
dwSize
);
return
HeapReAlloc
(
GetProcessHeap
(),
0
,
lpSrc
,
dwSize
);
}
dlls/setupapi/setupapi.spec
View file @
38b14b4c
...
...
@@ -219,10 +219,10 @@
@ stub MemoryInitialize
@ stub MultiByteToUnicode
@ stub MultiSzFromSearchControl
@ st
ub MyFree
@ st
dcall MyFree(ptr)
@ stub MyGetFileTitle
@ st
ub MyMalloc
@ st
ub MyRealloc
@ st
dcall MyMalloc(long)
@ st
dcall MyRealloc(ptr long)
@ stub OpenAndMapFileForRead
@ stub OutOfMemory
@ stub QueryMultiSzValueToArray
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment