JetInit3 issue (ESENT) on Win 8 Dev Preview‏ RRS feed

  • Question

  • Hi guys,

    I'm currently writing a metro app using ESE (Extensible Storage Engine) and everytime I call JetInit3 I get a JET_errFileAccessDenied (-1032) error, even when I'm setting the options after creating the instance. The options change the working folder to Windows.Storage.ApplicationData.Current.LocalFolder and I've granted FullControl permissions to everyone, has anyone had the same issue before? The error message being logged is

    mvpfinder (3296) MyInstance: An attempt to open the device with name "\\.\C:" containing "C:\" failed with system error 5 (0x00000005): "Access is denied. ".
    The operation will fail with error -1032 (0xfffffbf8).

    void JetFactory::SetEngineOptions() {
    char folder[FILENAME_MAX];
    ConvertString(ApplicationFolder, &folder[0]);
    JetSetSystemParameter(&hInstance, NULL, JET_paramCircularLog, true, NULL);
    JetSetSystemParameter(&hInstance, NULL, JET_paramLogFilePath, NULL, (JET_PCSTR) folder);
    JetSetSystemParameter(&hInstance, NULL, JET_paramSystemPath, NULL, (JET_PCSTR) folder);
    JetSetSystemParameter(&hInstance, NULL, JET_paramTempPath, NULL, (JET_PCSTR) folder);

    JetFactoryResult^ JetFactory::CreateInstance(JET_INSTANCE& pInstance) {
    char instance[FILENAME_MAX];
    ConvertString(instanceName, &instance[0]);
    auto retval = ref new JetFactoryResult(false, -1, "Unable to create Jet instance", ref new FailureException);

    y = JetCreateInstance2(&pInstance, (JET_PCSTR) instance, (JET_PCSTR) instance, NULL);
    x = JetInit3(&pInstance, NULL, NULL); // The JET_errFileAccessDenied occurrs here
    z = JetBeginSession(pInstance, &sessionId, "", "");

    if (z == JET_errSuccess)
    retval = ref new JetFactoryResult(true, 1, "Success", nullptr);

    return retval;




    Tuesday, December 13, 2011 4:22 AM

All replies