mirror of
https://github.com/reactos/reactos.git
synced 2024-08-20 18:35:32 +00:00
- add cat, load, unload, infinst, nts2w32err, objdir, partinfo to build system
- fix includes in those modules svn path=/trunk/; revision=24501
This commit is contained in:
parent
7ee180373e
commit
728ea14e4f
7
reactos/base/applications/utils/cat/cat.rbuild
Normal file
7
reactos/base/applications/utils/cat/cat.rbuild
Normal file
|
@ -0,0 +1,7 @@
|
|||
<module name="cat" type="win32cui" installbase="bin" installname="cat.exe" >
|
||||
<define name="__USE_W32API" />
|
||||
<library>msvcrt</library>
|
||||
<library>kernel32</library>
|
||||
<library>ntdll</library>
|
||||
<file>cat.c</file>
|
||||
</module>
|
8
reactos/base/applications/utils/driver/driver.rbuild
Normal file
8
reactos/base/applications/utils/driver/driver.rbuild
Normal file
|
@ -0,0 +1,8 @@
|
|||
<group>
|
||||
<directory name="load">
|
||||
<xi:include href="load/load.rbuild" />
|
||||
</directory>
|
||||
<directory name="unload">
|
||||
<xi:include href="unload/unload.rbuild" />
|
||||
</directory>
|
||||
</group>
|
|
@ -1,31 +1,32 @@
|
|||
/*
|
||||
* Load a device driver
|
||||
*/
|
||||
#define WIN32_NO_STATUS
|
||||
#include <windows.h>
|
||||
#include <ntos/zw.h>
|
||||
#include <stdlib.h>
|
||||
#include <ntndk.h>
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
int wmain(int argc, WCHAR * argv[])
|
||||
{
|
||||
NTSTATUS Status;
|
||||
UNICODE_STRING ServiceName;
|
||||
|
||||
if (argc != 2)
|
||||
{
|
||||
printf("Usage: load <ServiceName>\n");
|
||||
wprintf(L"Usage: load <ServiceName>\n");
|
||||
return 0;
|
||||
}
|
||||
ServiceName.Length = (strlen(argv[1]) + 52) * sizeof(WCHAR);
|
||||
ServiceName.Length = (wcslen(argv[1]) + 52) * sizeof(WCHAR);
|
||||
ServiceName.Buffer = (LPWSTR)malloc(ServiceName.Length + sizeof(UNICODE_NULL));
|
||||
wsprintf(ServiceName.Buffer,
|
||||
L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\%S",
|
||||
argv[1]);
|
||||
wprintf(L"%s %d %d\n", ServiceName.Buffer, ServiceName.Length, wcslen(ServiceName.Buffer));
|
||||
wprintf(L"%s %u %d\n", ServiceName.Buffer, ServiceName.Length, wcslen(ServiceName.Buffer));
|
||||
Status = NtLoadDriver(&ServiceName);
|
||||
free(ServiceName.Buffer);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
printf("Failed: %X\n", Status);
|
||||
wprintf(L"Failed: %x\n", Status);
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
|
|
8
reactos/base/applications/utils/driver/load/load.rbuild
Normal file
8
reactos/base/applications/utils/driver/load/load.rbuild
Normal file
|
@ -0,0 +1,8 @@
|
|||
<module name="load" type="win32cui" installbase="bin" installname="load.exe" unicode="true" >
|
||||
<define name="__USE_W32API" />
|
||||
<library>msvcrt</library>
|
||||
<library>kernel32</library>
|
||||
<library>ntdll</library>
|
||||
<library>user32</library>
|
||||
<file>load.c</file>
|
||||
</module>
|
|
@ -1,21 +1,22 @@
|
|||
/*
|
||||
* Unload a device driver
|
||||
*/
|
||||
#define WIN32_NO_STATUS
|
||||
#include <windows.h>
|
||||
#include <ntos/zw.h>
|
||||
#include <stdlib.h>
|
||||
#include <ntndk.h>
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
int wmain(int argc, WCHAR * argv[])
|
||||
{
|
||||
NTSTATUS Status;
|
||||
UNICODE_STRING ServiceName;
|
||||
|
||||
if (argc != 2)
|
||||
{
|
||||
printf("Usage: unload <ServiceName>\n");
|
||||
wprintf(L"Usage: unload <ServiceName>\n");
|
||||
return 0;
|
||||
}
|
||||
ServiceName.Length = (strlen(argv[1]) + 52) * sizeof(WCHAR);
|
||||
ServiceName.Length = (wcslen(argv[1]) + 52) * sizeof(WCHAR);
|
||||
ServiceName.Buffer = (LPWSTR)malloc(ServiceName.Length + sizeof(UNICODE_NULL));
|
||||
wsprintf(ServiceName.Buffer,
|
||||
L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\%S",
|
||||
|
@ -25,7 +26,7 @@ main(int argc, char *argv[])
|
|||
free(ServiceName.Buffer);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
printf("Failed: %X\n", Status);
|
||||
wprintf(L"Failed: %X\n", Status);
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
<module name="unload" type="win32cui" installbase="bin" installname="unload.exe" unicode="true">
|
||||
<define name="__USE_W32API" />
|
||||
<library>msvcrt</library>
|
||||
<library>kernel32</library>
|
||||
<library>ntdll</library>
|
||||
<library>user32</library>
|
||||
<file>unload.c</file>
|
||||
</module>
|
10
reactos/base/applications/utils/infinst/infinst.rbuild
Normal file
10
reactos/base/applications/utils/infinst/infinst.rbuild
Normal file
|
@ -0,0 +1,10 @@
|
|||
<module name="infinst" type="win32cui" installbase="bin" installname="infinst.exe" >
|
||||
<define name="__USE_W32API" />
|
||||
<library>msvcrt</library>
|
||||
<library>kernel32</library>
|
||||
<library>ntdll</library>
|
||||
<library>user32</library>
|
||||
<library>setupapi</library>
|
||||
<library>comdlg32</library>
|
||||
<file>infinst.c</file>
|
||||
</module>
|
|
@ -12,9 +12,10 @@
|
|||
* 2004-01-10 Emanuele Aliberti
|
||||
*
|
||||
*/
|
||||
#define WIN32_NO_STATUS
|
||||
#include <windows.h>
|
||||
#include <ntddk.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <ntndk.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int main (int argc, char * argv [])
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
<module name="nts2w32err" type="win32cui" installbase="bin" installname="nts2w32err.exe" >
|
||||
<define name="__USE_W32API" />
|
||||
<library>msvcrt</library>
|
||||
<library>kernel32</library>
|
||||
<library>ntdll</library>
|
||||
<file>nts2w32err.c</file>
|
||||
</module>
|
|
@ -17,11 +17,11 @@
|
|||
* Added -r option.
|
||||
*/
|
||||
|
||||
#include <ntddk.h>
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#define WIN32_NO_STATUS
|
||||
#include <windows.h>
|
||||
#include <stdlib.h>
|
||||
#include <ntndk.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#define MAX_DIR_ENTRY 256
|
||||
|
||||
|
|
9
reactos/base/applications/utils/objdir/objdir.rbuild
Normal file
9
reactos/base/applications/utils/objdir/objdir.rbuild
Normal file
|
@ -0,0 +1,9 @@
|
|||
<module name="objdir" type="win32cui" installbase="bin" installname="objdir.exe">
|
||||
<define name="__USE_W32API" />
|
||||
<define name="UNICODE" />
|
||||
<define name="_UNICODE" />
|
||||
<library>msvcrt</library>
|
||||
<library>kernel32</library>
|
||||
<library>ntdll</library>
|
||||
<file>objdir.c</file>
|
||||
</module>
|
|
@ -2,13 +2,11 @@
|
|||
* partinfo - partition info program
|
||||
*/
|
||||
|
||||
#define WIN32_NO_STATUS
|
||||
#include <windows.h>
|
||||
//#include <winioctl.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <ntddk.h>
|
||||
#include <ntndk.h>
|
||||
#include <stdio.h>
|
||||
|
||||
//#define DUMP_DATA
|
||||
#define DUMP_SIZE_INFO
|
||||
|
|
7
reactos/base/applications/utils/partinfo/partinfo.rbuild
Normal file
7
reactos/base/applications/utils/partinfo/partinfo.rbuild
Normal file
|
@ -0,0 +1,7 @@
|
|||
<module name="partinfo" type="win32cui" installbase="bin" installname="partinfo.exe">
|
||||
<define name="__USE_W32API" />
|
||||
<library>msvcrt</library>
|
||||
<library>kernel32</library>
|
||||
<library>ntdll</library>
|
||||
<file>partinfo.c</file>
|
||||
</module>
|
|
@ -2,6 +2,24 @@
|
|||
<directory name="binpatch">
|
||||
<xi:include href="binpatch/binpatch.rbuild" />
|
||||
</directory>
|
||||
<directory name="cat">
|
||||
<xi:include href="cat/cat.rbuild" />
|
||||
</directory>
|
||||
<directory name="driver">
|
||||
<xi:include href="driver/driver.rbuild" />
|
||||
</directory>
|
||||
<directory name="infinst">
|
||||
<xi:include href="infinst/infinst.rbuild" />
|
||||
</directory>
|
||||
<directory name="nts2w32err">
|
||||
<xi:include href="nts2w32err/nts2w32err.rbuild" />
|
||||
</directory>
|
||||
<directory name="objdir">
|
||||
<xi:include href="objdir/objdir.rbuild" />
|
||||
</directory>
|
||||
<directory name="partinfo">
|
||||
<xi:include href="partinfo/partinfo.rbuild" />
|
||||
</directory>
|
||||
<directory name="ps">
|
||||
<xi:include href="ps/ps.rbuild" />
|
||||
</directory>
|
||||
|
|
Loading…
Reference in a new issue