MCPcopy Create free account
hub / github.com/JHRobotics/softgpu / addLine

Function addLine

winini.c:396–416  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

394}
395
396BOOL addLine(const char *target, const char *line)
397{
398 removeROFlag(target);
399
400 HANDLE file = CreateFileA(target, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
401 if(file != INVALID_HANDLE_VALUE)
402 {
403 DWORD junk;
404
405 SetFilePointer(file, 0, NULL, FILE_END);
406 WriteFile(file, line, strlen(line), &junk, NULL);
407 CloseHandle(file);
408 return TRUE;
409 }
410 else
411 {
412 REPORT("CreateFileA: %ld", GetLastError());
413 }
414
415 return FALSE;
416}
417
418BOOL truncateFile(const char *target, size_t position, char **rest_of_file, size_t *rest_size)
419{

Callers 5

registryWriteInfFunction · 0.85
registryDeleteInfFunction · 0.85
registryDeleteKeyInfFunction · 0.85
simd95Function · 0.85
apply_deleteFunction · 0.85

Calls 1

removeROFlagFunction · 0.85

Tested by

no test coverage detected