FASM using custom resource files - windows

How do I include my custom resource files and be able to access them with the windows api?

You can find some info about resources here.

Related

ibm liberty server. wlp-javaee8-20.0.0.6. How to register callback handler for ws-security

The section 3.b on Securing a web service by using a WS-Security policy requires placing the custom callback handler under the following path:
build.image/wlp/usr/extension/lib/SampleCbh.jar
build.image/wlp/usr/extension/lib/features/wsseccbh-1.0.mf
The following is the content of the wlp-javaee8-20.0.0.6\wlp\usr\ path.
.settings\
servers\
shared\
.project
There is no 'extension/lib' directory under that path.
Where the SampleCbh.jar and wsseccbh-1.0.mf files should be placed?
As the workaround I've registered the JAR under the wlp/lib/ and the MF under the wlp/lib/features/ paths.
I am not sure if it is the recommended way to register custom user features as they contains the vendor features.

How do I include a custom inspec resource in multiple profiles?

I have written a custom chef inspec resource to work with a proprietary configuration format that the company I work for uses. I have put the resource in the .\myprofile\libraries folder as the documentation dictates that I should[1]. However, I want to use this resource in multiple profiles without copy/pasting the same resource or symlinking the resource (I'm developing on Windows). Is there a way I can define this resource in a single location and then reference it in multiple profiles?
[1] https://www.inspec.io/docs/reference/dsl_resource/
You can create a profile with your custom resource defined there. I would suggest some profile without any controls, or with minimum amount of controls, which all depend on your custom resource.
Then in the other profiles, where you need your custom resource you can reference your fist profile in inspec.yml:
depends:
- name: my_profile_with_custom_resource
path: ../relative/path
Inplace of path can be an url or a absolute path or git url (with branch and tags). By default all the controls and custom resources defined in my_profile_with_custom_resource will be available in the new profile.

Google Drive api scope and file access (drive vs drive.files)

I have created two refresh tokens for me:
one for
SCOPE = 'https://www.googleapis.com/auth/drive'
and another
SCOPE = 'https://www.googleapis.com/auth/drive.file'
I'm trying to get information about files (using get method)
Some files I can get when using SCOPE drive.files, and some only when using wider scope drive
But I can not figure out what is the reason for that? Files are located in different folders but have one shared root folder.
The difference is that 'drive.file' only gives you permission to files that your app has created or the user has explicitly shared with your app, whereas 'drive' gives your app permission to see the all the files in the user's drive.
See
https://developers.google.com/drive/web/scopes
You should really look into using drive.file, that is where they are trying to push users. I was just fighting with this myself and found that if you use the drive.file scope, you can then subsequently open the file that is chosen using the API for the file type, but only if you set the correct AppID.
See here: https://developers.google.com/picker/docs/#gdata
This allows you to get past the 404 error that you get if you don't set the AppID.

How can I get a list of all embedded resources defined in my application?

How to get a list of all files (e.g. images) embedded as resources or content programmatically?
I tried
ResourceDictionary res = Application.Current.Resources;
But this does not return any files.
If the resources have build action Content then there is no way to enumerate them. You can only access them directly by name (so you would already have to know the names).
For resources with build action Resource or Embedded Resource you can use Ivan's solution.
The discussion to this similar question might give you a bit more code and information.
Hope this help:
var resourceNames = Assembly.GetExecutingAssembly().GetManifestResourceNames();

using an image embedded in a directory of a dll

I have a .NET 4.0 class library with a directory called Resources, with an image called Logo.bmp inside it set to be compiled as an embedded resource.
In my main application I add the dll reference and set a Uri to pack://application:,,,/ResourceImages;component/Resources/logo.bmp and then I try to get the resource stream to that resource (using Application.GetResourceStream(myUri)) but it can't find the resource specified.
If however I put the image in the root directory of my dll and take out the Resources/ it can find and return the resource stream without issue.
Any suggestions?
to anyone else who might be having this particular issue, make sure that you build the string to pass into the new uri BEFORE you make the new call, not during. I changed it so that the pack: location string is all created ahead of time and now it works

Resources