w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
DLLs loaded from wrong AppplicationBase when trying to load mixed C# and C++/CLI dlls in a new AppDomain
This appears to be a bug in .NET 4.5. NUnit creates a new app domain to run the unit tests. If the unit test assembly or any of it's references are mixed-mode assemblies, it ends up trying to load the mixed-mode assembly's references in the default app domain too, under certain conditions. The runtime has to initialize the unmanaged c++ code of the mixed mode assembly before it does anything else in that assembly. It does this via the automatically compiled-in LanguageSupport class (the source code for this is distributed with Visual Studio). LanguageSupport::Initialize is first run in the static constructor of the mixed-mode unit test assembly's compiler-generated .module class, in the context of the NUnit-created appdomain. LanguageSupport in turn re-triggers the same static construct

Categories : C#

Prepared Statement for tons of columns
As Luiggi Mendoza stated in the comment, the query will work. example in this query: ps=conn.prepareStatement("INSERT INTO vbulletin_user(userid,username,password,email) VALUES(?,?,?,?)"); ps.setInt(1,1); ps.setString(2,"scott"); ps.setString(3,"tiger"); ps.setString(4,"email@example.com"); the default values will be inserted for other columns as they are mentioned in the schema. And You should set the default value for Date to some specific date instead of 0000-00-00 like in your passworddate and birthday_search column since it would lead to some exception when accessing by java java.sql.SQLException: Value '0000-00-00' can not be represented as java.sql.Date Here is the Fiddle, in this I just changed the value for default date for passworddate and birthday_search columns.

Categories : Java

Hash Efficiency with tons of data
As others stated, your most likely bottleneck isn't hashes or Perl, but disk access. Split up the file into smaller chunks. (using standard Unix utils if you can). Store them on SEPARATE IO sources (different disks ideally on different controllers, ideally on different PCs). If you have only a few keys (e.g. >100-1000 rows per key), simply run chunks separately, then concatenate them all into 100x smaller file, and process that one file as a whole. Otherwise, synchronize the processing using a database to store sums.

Categories : Perl

Getting tons of javascript errors in IE10, but no other browser
You need to install ASP.NET hotfixes on the server to update its browser definition files such that it recognizes that IE10 is a browser that supports JavaScript. Please see the duplicate question.

Categories : Javascript

Tons of strange parse errors in Xcode
I have already seen these kinds of errors a million times when I was on Xcode 4.2. I bet you are on Xcode 4.2 right now when you compiled it. If you want to use ZipArchive then upgrade your Xcode to latest 4.6 and all these errors will go away.

Categories : IOS

Tons of errors when starting a virtual device
I never had any problems with the virtual emulator, if N4 doesn't work pick another one, or use an Android device through usb. It's slow no matter what you do, but if you use large image resources it becomes even slower because it has to pack everything inside the .apk, send it to the device and install it. ADT Bundle is the way to go.

Categories : Android

Mongoengine throwing tons of validation errors when saving a model
Ugh, finally figured it out. Because of how mongoengine refers to documents and the way python handles += when adding things to a list it basically tried to add every single field to the list. When I changed it to info['owner'].groups.append(group) It performed the intended behavior and was error free

Categories : Django

HTMLUnit: Tons of obsolete content and can't create objects warnings on getPage() then fails with Exception invoking setOuterHTML on getByXPath()
The error comes from a MicrosoftAjax.js file. Try simulating chrome: final WebClient webclient = new WebClient(BrowserVersion.CHROME); Also added a link to suppress HtmlUnit warnings. Also, your XPath doesn't find anything (I tested in Chrome). I used another for example purposes: import java.util.List; import com.gargoylesoftware.htmlunit.WebClient; import com.gargoylesoftware.htmlunit.BrowserVersion; import com.gargoylesoftware.htmlunit.html.HtmlAnchor; import com.gargoylesoftware.htmlunit.html.HtmlPage; public class ScrapperApp { private static void go() throws Exception { /* turn off annoying htmlunit warnings */ java.util.logging.Logger.getLogger("com.gargoylesoftware").setLevel(java.util.logging.Level.OFF); HtmlPage nextPage; String url =

Categories : Java

What does GAC uses to keep record of DLLs
The GAC uses an assemblies strong-name to identify it, this is a combination of simple text name, version number, and culture information (if provided) — plus a public key and a digital signature Given you are renaming the DLL then the GAC should identify your updated DLL as a completely different assembly so there should be no issues with overwriting the the original.

Categories : C#

How can I use my C++ DLLs with a C application?
You will have to create C wrapper functions which can pass opaque pointers to your class instances. Here is what seems like a reasonable example: http://www.daniweb.com/software-development/cpp/threads/355990/strategy-for-consuming-c-dlls-in-c Quote from the link: typedef Foo* FOO_HDL; extern "C" { __declspec(dllexport) FOO_HDL FooCreate() { return new Foo(); }; __declspec(dllexport) void FooDestroy(FOO_HDL obj) { delete obj; }; __declspec(dllexport) double FooGetValue(FOO_HDL obj) { return obj->GetValue(); }; __declspec(dllexport) void FooSetValue(FOO_HDL obj, double NewValue) { obj->SetValue(NewValue); }; };

Categories : C++

Authenticating DLLs in C#
If you sign your DLL then at runtime you can check the StrongName of the DLL before you load it. You could also check that the public key used to sign it is the one that you expect. To get the public key of an assembly you can do this: Assembly assembly = ... AssemblyName assemblyName = assembly.GetName(); byte[] publicKey = assemblyName.GetPublicKey(); I just checked and there's already a good answer about this on StackOverflow here: http://stackoverflow.com/a/1350012/106159

Categories : C#

QT5.0.2 project needs more DLLs than QT4.8
Some of the modules you use may be dependent on those you don't, which means your project depends on them indirectly. For example, by default, some modules (QtWebKit, QtMultimedia) utilize ANGLE which uses OpenGL. You can try to trace those dependencies by using a program named Dependency Walker (available here). The Qt GUI has changed a lot since 4.8, and there are now separate modules for printing and other functions (see here). Sources: Qt 5 on Windows ANGLE and OpenGL Qt 5 Deployment on Windows By the way, someone has (had) a similar problem: http://www.qtcentre.org/archive/index.php/t-52102.html. (Unfortunately, there is no solution in that link.) It turned out that this is actually a bug in Qt.

Categories : Qt

Qt: cannot find DLLs even if I specify their location
Qt automatically know its library locations, if you want to launch your application from app directory, you must copy required Qt DLLs to your directory, this post describes it: Qt 5.0 program runs in QtCreator but not outside

Categories : Qt

Can a .NET web application run with only dlls and configs?
After a little bit of investigation I don't believe it's possible. I uploaded just the DLLs (in a bin folder) and the web.config and it didn't work. I added the remaining files and it did.

Categories : Dotnet

Decompilation multiple Dlls
I created an addin to do that a while back. You can get the Dll here or the source code here It adds an item to the File menu that opens a Folder Browser and will add all .net assemblies found in that directory to the assembly browser. There's a little more information about it on the Reflector form here

Categories : Dotnet

Embedding external DLLs in a EXE
If all DLLs are .Net assemblies you could check out ILMerge or add the assemblies as ressource and attach to the AssemblyResolve event like mentioned here.

Categories : C#

Do I have to include all these Qt dlls with my application?
UPDATE: Use windeployqt.exe! It works really well. http://doc.qt.io/qt-5/windows-deployment.html#the-windows-deployment-tool The simplest way to use windeployqt is to add the bin directory of your Qt installation (e.g. ) to the PATH variable and then run: windeployqt <path-to-app-binary> UPDATE: Upon Further testing, windeployqt did not copy over all the MingW dlls for me. (Tested with Qt 5.4 on Windows 10 with MingW 4.9.1). So you need to manually get the last 3 dlls before deploying: libgcc_s_dw2-1.dll libstdc++-6.dll libwinpthread-1.dll From C:Qt5.4mingw491_32in I think you may have a few extras in your list... I would double check the docs in the links below... Here is the definitive documentation on it: http://doc.qt.io/qt-5/windows-deployment.html ht

Categories : C++

About Static libraries and dlls
I think that the header will try to use freeglut.lib either way. You have to specify that you like to use the static version. #define FREEGLUT_STATIC (the same goes for GLUT) Here is a blog post that appens to talk about the same issue: http://mattfife.com/?p=226

Categories : Windows

Merging two dlls using DLL2LIB
I don't think it's possible by converting to a LIB. DLL differs from LIB. For example, there is a startup code placed into a DllMain function. So I would suggest to google for "exe bundle", you will find some tools to embed DLLs into EXE: http://bit.ly/16jdv0z Hope this helps.

Categories : Visual Studio

GAC Assembly redirection for several .dlls
Due to this article, I had to create one Policy for each combination of MajorVersion.MinorVersion of my assembly. So I had to create two policies: One to be able to redirect from 1.0.0.0 to 1.2.0.0 And another one to redirect from 1.1.0.0 to 1.2.0.0 This solution works, but if anyone knows a more efficient way to do this, I will really appreciate it.

Categories : Misc

Loading DLLs at runtime in C#
Members must be resolvable at compile time to be called directly from C#. Otherwise you must use reflection or dynamic objects. Reflection namespace ConsoleApplication1 { using System; using System.Reflection; class Program { static void Main(string[] args) { var DLL = Assembly.LoadFile(@"C:visual studio 2012ProjectsConsoleApplication1ConsoleApplication1DLL.dll"); foreach(Type type in DLL.GetExportedTypes()) { var c = Activator.CreateInstance(type); type.InvokeMember("Output", BindingFlags.InvokeMethod, null, c, new object[] {@"Hello"}); } Console.ReadLine(); } } } Dynamic (.NET 4.0) namespace ConsoleApplication1 { using System; using Syste

Categories : C#

Sharing DLLs between multiple WCF services?
If you wanted to reference shared copies I would use reflection to load/unload the .dlls at runtime inside your services. This would allow you to reference from a common location and you could change/updated the .dll files without having to rebuild your service code.

Categories : Wcf

DLLs register present in a folder
Okay, this should work: Code: @echo off pushd C:...[path to file] for /r %%a in (*.dll) do ( Rem Put the instance of the REG command you want to use here Rem (refer to file as %%a) Rem e.g. | REG add %%a Echo Registering %%a . . . ) popd Echo. Pause | Echo Registration Complete: Program will now Exit Exit Pretty much for /r performs a recursive search through the current dir (and sub-dirs). Type for /? for more info or ask if you want further explanation. Explanation: In the above code all commands used followed by and explanation is below: Echo - Displays a message on the screen. @echo - Turns Echo to either on or off. Turning it off will suppress the console from displaying the prompt. That is, the user will not see what commands the batch file is executing, only what you tell

Categories : Batch File

How do I get started writing DLLs in visual C++?
You need .h for compiler (use with #include, and add the folder to .h file as relative path to Configuration Properties > C/C++ > General > Additional Include Directories). Aside from .lib for linker you also need .dll to actually run the test application. EDIT: There are two types of DLL's that you can make. First are C-like DLL's, with functions that have signatures as if they are written in C instead of in C++. All Windows DLL's (user32.dll, shell32.dll, version.dll) are built as such. The other are C++ DLL's, with functions that are part of the class. MFC and Standard C++ Libraries are such. If you want to make a C++ DLL then you have to declare all classes that are part of interface as __declspec(dllexport) in your DLL project and __declspec(dllimport) in all projects that would use

Categories : C++

merge dependent dlls in c# application
I'd recommend using Costura. https://github.com/Fody/Costura Costura is avaliable on NuGet and is a simple solution for providing a custom AssemblyResolve system. It will take all your projects references and automatically add them at build time. Also, if you have native or mixed-mode assemblies (like for example 7zip) then you'll need to provide Costura with a bit of configuration. Everything is covered in the readme.

Categories : C#

Can't find VSIX dlls with DllImport
Windows is unable to open DLL files embedded into compressed .zip, so you will have to unpack it and put in a folder where you have the access to write to. The .NET Framework will look for the paths of your DLLs in %LocalAppData%, so it is reasonable to unpack your DLL there.

Categories : C#

Why COM DLLs exports should be marked "PRIVATE"?
When you build a DLL, the linker automatically creates an import library for the DLL. It contains a list of all the exported functions. You use that import library in another project that uses the DLL. Specific to COM servers is that those 4 exported functions are always found with GetProcAddress() and you never have an implicit dependency on a COM dll. You always create COM objects with CoCreateInstance(), the COM plumbing takes care of locating the DLL and using GetProcAddress() to find the DllGetClassObject() function. Same story for DllUn/RegisterServer, found by Regsvr32.exe. And DllCanUnloadNow, found by the COM plumbing. You therefore have no need for an import library. Using PRIVATE ensures that the function doesn't get exported to an import library. With all of them priva

Categories : C++

VB6 calling .NET 4.0 DLLs on a network share
You should be able to debug the C#.NET dll by setting the start action under Debug to Start external program and specify the VB6 executable as the program. I know this works as I use this to debug a .NET/C# plugin for an old VB6 application. It shouldn't matter how many other dlls (.NET or otherwise) you have to go through to get to the code you are trying to debug.

Categories : Dotnet

How to use external DLLs in CMake project
First, edit your CMakeLists.txt to include your third party library. You'll need two thing: path to header files and library file to link to. For instance: # searching for include directory find_path(SIFTGPU_INCLUDE_DIR siftgpu.h) # searching for library file find_library(SIFTGPU_LIBRARY siftgpu) if (SIFTGPU_INCLUDE_DIR AND SIFTGPU_LIBRARY) # you may need that if further action in your CMakeLists.txt depends # on detecting your library set(SIFTGPU_FOUND TRUE) # you may need that if you want to conditionally compile some parts # of your code depending on library availability add_definitions(-DHAVE_LIBSIFTGPU=1) # those two, you really need include_directories(${SIFTGPU_INCLUDE_DIR}) set(YOUR_LIBRARIES ${YOUR_LIBRARIES} ${SIFTGPU_LIBRARY}) endif ()

Categories : C++

Full Path of Loaded Dlls?
You do actually want to download and run Dependency Walker. Opening your application in this program will display all its dependencies, show their paths (and you can display the full paths) and reveal those DLLs it can't find. If some of your DLLs are loaded dynamically, just use the profile option to actually execute the application. This will additionally show those dependencies which are loaded at a later stage within your program.

Categories : C++

Deploying .NET COM dlls, issues when used on another computer
Hi try the following in command prompt instead of regsvr32 try the following : "RegAsm.exe acxMaterialClassificationMerge.dll /codebase " where acxMaterialClassificationMerge.dll is your dll. You should do this on every pc thats going to use the dll. RegAsm is located in C:WindowsMicrosoft.NETFrameworkv2.0.50727

Categories : C#

Embedded Unmanaged DLLs don't load in ASP.NET
Apparently ASP.NET's eager loading mechanism was the problem. Because the managed wrapper was copied to the output directory, ASP found it and tried to link to the unmanaged DLL on startup, even though it didn't exist yet. To solve the problem, I used the /DELAYLOAD linker option on the C++/CLI DLL and a LoadLibrary() P/Invoke in Application_Start() in combination with the embedded DLL extraction shown above.

Categories : Asp Net

Loading multiple versions of DLLs
Edit: If the intermediate DLL is a .Net Assembly, you can use the method mentioned here to specify where to look for your intermediate DLL before you call any method that uses the intermediate DLL, without having to change your existing code. then you must not directly reference the DLL in your C# project, because .Net Assemblies are discovered and loaded before your Main method is even called. Instead, you must dynamically load the intermediate DLL using AppDomain or other methods, then use the library via reflection, or by using dynamic objects. Apparently, this would make programming very cumbersome. However, there is an alternative method. You can write a launcher program, that loads your original application (you can load .exe files as libraries), and invokes the Main method of yo

Categories : C#

SVN Don't Ignore dlls in "External References" folder
You need to set special SVN property for those directories where you need to ignore these files. In directories where you need to ignore all .dll files - use this extension. In directories where some files need to be ignored - use their names. To ignore all .dll files within the current folder: svn propset svn:ignore '*.dll' . To ignore some .dll files within the current folder fill the text file and apply: echo a1.dll > svnignore.txt echo a2.dll >> svnignore.txt svn propset svn:ignore -F svnignore.txt . And after that don't forget to commit changes: svn commit -m "Ignore some .dll" Note that it will clear all previous svn:ignore properties set for these folders if any (in this case you should use svn propedit). If you have a lot of folders on the same level as "Externa

Categories : Svn

Safety of using DLLs as C++ game SDK release (dll modified, exe never)
There is a whole heap of problems with "if you modify this class it wont work with the class defined somewhere else. There are also plenty of solutions to those problems. Typically forming interfaces using (smart) pointers and/or references rather than the class itself avoids both parts of the code having to agree on the size of a class. So, for example, instead of having : class EntityCollection { private: vector <Entity> entities; public: void addEntity(Entity e) { entities.push_back(e); } void removeEntity(Entity e) { ... } }; we'd use a pointer style storage (should really use smart pointers, but to make it short and simple, I'm not): class EntityCollection { private: vector <Entity*> entities; public: void addEntity(Entity* e) { entities.

Categories : C++

How can I get return values from C# .DLLs in LabVIEW 2012?
You have created public HSL getters, and LabVIEW knows how to access it. Just use a property node in your VI, and link it to the object reference after the call to SetColor(), H S and L will be in the choice list of the property node.

Categories : C#

What is the equivalent of forwarding DLLs in Linux/Unix?
The Linux equlivalent is rather easy. You can just use a symbolic link. For example, lib4 is the new library version, then you can create the following symbolic link: ln -s lib4 lib3 Now, every time a program will need lib3 will automatically load lib4 as long as the interface exported by the new version is equal to the old version, the program will not notice the difference. I hope this helps. Let me know if you need more info.

Categories : Linux

Where does an ASP.NET WebSite or Web Application store Referenced DLLs
Check this question for some ideas. The short answer to your question is that the equivalent folder of Debug/bin in a web application is [root]/bin. When you reference DLLs from VS, you can set Copy Local to true for a DLL and it will bi copies in the [root]/bin folder when you publish the web application. If you want to store the DLLs inside your solution, you can make a folder with a different name than bin and put the DLLs in it and then when you Add References select browse and reference them from your solution's folder.

Categories : Asp Net

TFS Build 2010 + Referencing DLLs from drops
I dont know enough about the team foundation service but I hope you have access to the build defintion and you will be able to customize it. Make your client specific code look for the DLL's from a root BIN folder. Then within the build definition, after the "GetWorkspace" activity. Add a new activity (from the toobox either CopyDirectory or InvokeProcess) to copy all the built DLL's from your droplocation to the root bin folder. To identify the latest version, you can create a custom activity (write c# code), which will look at the drop folder and identify the greatest version number. After finding the version number set it to a variable, which will be then used by the CopyDirectory or InvokeProcess activity. CopyDirectory is straight forward, you just add the source and destination l

Categories : Tfs

Do I need TFS installed on the machine that will use some dlls to communicate remotely to it?
The 11.0 DLLs are fine - it means you're using the 2012 client DLLs, but they work fine against a 2010 TFS server. If VS is not installed on the machine where your app is running, you will need to deploy them with your app. See http://geekswithblogs.net/TarunArora/archive/2011/06/18/tfs-2010-sdk-connecting-to-tfs-2010-programmaticallyndashpart-1.aspx to know what DLLs are required and where to get them.

Categories : C#



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.