Giter Site home page Giter Site logo

x-tension-c-sharp's Introduction

x-tension-c-charp

An updated C# port of X-Ways X-Tensions API.

x-tension-c-sharp's People

Contributors

jp-slackspace avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

stdio-h

x-tension-c-sharp's Issues

GetItemType HelperMethod

Hello,

Although this works as described, the API has been since updated and can now return the item category, e.g 'Picture', 'Audio/video' and the file format consistency by combining the buffer length with some flags:

API documentation:

nBufferLenAndFlags contains the length of the buffer that lpTypeDescr points to in the lower word, measured in characters, and in v18.9 and later may be optionally combined with one of the below flags.

0x20000000: receive a textual description of the file type instead (e.g. “JPEG” or “Dynamic-Link Library”)
0x40000000: receive a textual designation of the category that the file type belongs to instead (e.g. “Pictures” or “Programs”)
0x80000000: receive type status as usual in the lowest byte, but file format consistency in the second-lowest byte (0=unknown, 1=OK, 2=irregular), v19.3 and later

GetHashValue

Hi JP,

I'm having an issue with the GetHashValue function which does not appear to be providing me with the item hash. Is this because the Buffer should be filled with an initial value?

X-ways API: "The buffer should be prepared and its start filled with a single DWORD value of 0x00000001. In v18.0 SR-12, v18.1 SR-7, v18.2 SR-5, v18.3 SR-4 and later versions you may fill the buffer with a DWORD 0x00000002 to request the secondary hash value of a file instead of the primary hash value"

I'm running v19.3.

Thanks
Dan

public static string GetHashValue(int itemId)
{
// Fail if item Id less than 0 provided.
if (itemId < 0)
throw new ArgumentException("Invalid item Id provided.");

        string Hash;
        IntPtr Buffer = Marshal.AllocHGlobal(_volumeNameBufferLength);
        ImportedMethods.XWF_GetHashValue(itemId, Buffer);
        Hash = Marshal.PtrToStringUni(Buffer);
        Marshal.FreeHGlobal(Buffer);
        return Hash;

}

X-ways not unloading Dll

Hello,

According to the X-ways documentation the DLL should be unloaded when its finished, however DLLs compiled from this don't appear to. This prevents recompiling without the need to restart X-ways.

Also as a result when it is run again in x-ways without restarting, Private Static variables are still set from the first use. For example if a timecode is set in the first use, the timecode will be the same when next run.

To ensure that this is not due to any changes I have made I have tested the compiled DLL found in in this repository. This DLL cannot be deleted after first use as it is 'still in use', without closing x-ways first.

Thanks!

PS. thanks for resolving the other issue so quickly. This repository is incredibly useful.

GetFullPath Issue

Per xtaylord:

"in the GetFullPath method in HelperMethods, I don't think you need the initial line:

sb.Insert(0, GetItemName);

as this seems to cause the item name to be duplicated within the path"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.