Replies: 2 comments
String? path;
String? description;
final shellLink = ShellLink.createInstance();
final persistFile = IPersistFile.from(shellLink);
final lpPath = wsalloc(MAX_PATH + 1);
final lpDescription = wsalloc(MAX_PATH + 1);
if (persistFile.load(shortcutPath.toNativeUtf16(), 0) == 0) {
if (shellLink.getPath(lpPath, MAX_PATH + 1, nullptr, MAX_PATH + 1) == 0) {
path = lpPath.toDartString();
}
if (shellLink.getDescription(lpDescription, MAX_PATH + 1) == 0) {
description = lpDescription.toDartString();
}
}
print('path: $path, description: $description');
free(lpPath);
free(lpDescription); |
0 replies
Answer selected by
nini22P
|
Can someone help me with how to convert the strings between UTF16 and Dart strings? Those are parts of the code that aren't referencing anything in the libraries. I also tried to search for an answer and couldn't find any. EDIT 2: EDIT: |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I searched and found that there is a ShellLink class, but I don't know how to use it.
All reactions