-
Notifications
You must be signed in to change notification settings - Fork 57
Open
Labels
Description
I am facing error unable to open volume in msvcpp console project on windows.
Do you know what is the reason?
Microsoft Visual Studio Community 2022 (64) Version 17.6.4
`
#include
#include <stdlib.h>
#include <stdio.h>
#define LIBFSNTFS_DLL_IMPORT
#include "libfsntfs.h"
using namespace std;
const char* ver = libfsntfs_get_version();
cout << ver << endl; ->20230427
libfsntfs_error_t* error = NULL;
int codepage;
libfsntfs_get_codepage(&codepage, &error);
cout << codepage << endl; ->1252
libfsntfs_set_codepage(932, &error);
libfsntfs_get_codepage(&codepage, &error);
cout << codepage << endl; ->932
libfsntfs_volume_t* volume = NULL;
if (libfsntfs_volume_initialize(&volume, &error) != 1)
{
cout << "fail ini" << endl; ->no output
}
const char* volume_path = R"(\\.\C:)";
if (libfsntfs_volume_open(volume, volume_path, LIBFSNTFS_ACCESS_FLAG_READ, &error) != 1)
{
cout << "fail open" << endl; ->fail open
cout << *error << endl; ->97
}
`
When I stepped in, I found that I was getting an error in the block below, but nothing more than that.
`
libcpath_path.c
if( libcsplit_narrow_split_string_get_number_of_segments(
path_split_string,
&path_number_of_segments,
error ) != 1 )
{
libcerror_error_set(
error,
LIBCERROR_ERROR_DOMAIN_RUNTIME,
LIBCERROR_RUNTIME_ERROR_GET_FAILED,
"%s: unable to retrieve number of path string segments.",
function );
goto on_error;
}
`