15,667,735 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View Javascript questions
View Python questions
View C++ questions
View Java questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by wpte (Top 18 by date)
wpte
12-Dec-14 8:00am
View
Reason for my vote of 3 \n The idea is there, but it could be much simpler.
Right now you have an interface, 2 implementations and which wraps it all.
Why not 1 static class, static constructor which sets the corresponding filename in the static field to use by the pinvoke methods?
It'll be just 1 file, no wrappers, less code and faster! :D
Moreover, the exported methods you use dll-import on are static anyway, so any OO argument is invalid.
wpte
19-Sep-13 17:04pm
View
I already use AppDomains extensively throughout my software.. Currently I only index the sub-directories once with reflection only load, so I can store the AssemblyName classes. When I'm done I throw away the AppDomain so no unnecessary memory is claimed. Since the construction of the cache only has to happen once, the resolving part is quite quick.
wpte
19-Sep-13 16:32pm
View
I load plugins in my programs using Assembly.LoadFrom. Some of these plugins require other Assemblies (references) which are not located in the GAC. With the event I attempt to load these references by trying to find them in some sub directories.
wpte
19-Sep-13 15:50pm
View
Allright. There's no way to check the correct version however. The only way to match the correct assembly is by matching strings. Bit unfortunate to be honest.
Still I'm convinced the event is called before .NET uses it's own resolver. I also get requests for System.something Assemblies which clearly need to be found in the GAC.
Also sorry for all the double posts, some code project maintenance was messing it up :(
wpte
19-Sep-13 15:15pm
View
Deleted
Actually since .NET 4.0 the event is raised for every assembly.
"Beginning with the .NET Framework 4, the ResolveEventHandler event is raised for all assemblies, including resource assemblies. In earlier versions, the event was not raised for resource assemblies. If the operating system is localized, the handler might be called multiple times: once for each culture in the fallback chain."
http://msdn.microsoft.com/en-us/library/system.appdomain.assemblyresolve.aspx
If null is returned the .NET system will attempt to load the Assembly by itself, using the GAC for example.
I'm talking about embedded resources. I do get requests of these embedded resources. The request name is formatted something like: "Namespace.ResourceName.resources" instead of the usual AssemblyName.FullName format.
wpte
19-Sep-13 15:15pm
View
Since .NET 4.0 the event is allways called before .NET tries to resolve the Assembly by itself using the GAC or local libraries in the same directory as the executable.
url: http://msdn.microsoft.com/en-us/library/system.appdomain.assemblyresolve(v=vs.100).aspx
"Beginning with the .NET Framework 4, the ResolveEventHandler event is raised for all assemblies, including resource assemblies. In earlier versions, the event was not raised for resource assemblies. If the operating system is localized, the handler might be called multiple times: once for each culture in the fallback chain."
I was talking about embedded resources. I get requests in the event with a format like: "namespace.resourcename.resources" not the usual format from AssemblyName.FullName
Now it's not that hard to find the accompanying Assembly which contains the embedded resource. As Collin Kleine suggests, returning an Assembly which contains the resource might be a good idea. I will check this tomorrow
wpte
19-Sep-13 15:13pm
View
Deleted
Actually since .NET 4.0 the event is raised for every assembly.
"Beginning with the .NET Framework 4, the ResolveEventHandler event is raised for all assemblies, including resource assemblies. In earlier versions, the event was not raised for resource assemblies. If the operating system is localized, the handler might be called multiple times: once for each culture in the fallback chain."
http://msdn.microsoft.com/en-us/library/system.appdomain.assemblyresolve.aspx
If null is returned the .NET system will attempt to load the Assembly by itself, using the GAC for example.
I'm talking about embedded resources. I do get requests of these embedded resources. The request name is formatted something like: "Namespace.ResourceName.resources" instead of the usual AssemblyName.FullName format.
wpte
13-Mar-13 19:15pm
View
Allright. I felt you came on a bit hard onto me, so I wrote a defensive repsonse. I understand managing a big site is difficult. I'm a moderator on a smaller site which can prove quite a bit of trouble now and then.
Thanks for explaining, and no hard feelings :)
wpte
13-Mar-13 18:01pm
View
Well with custom I pretty much mean something like an alternate implementation, an override for example.
With these links I could probably cook something up, definitely a good read.
Thanks
wpte
13-Mar-13 17:54pm
View
I find outrageous a big word to be quite honest. If the OP found a solution to his/hers problem it shouldn't be that weird to accept that as a solution when nothing else comes up.
I do agree with that my "solution" isn't really that much of a solution. The solution more or less is, that it's impossible. Point is that it worked for me and thus is a solution for me and thus I (apparently mistakenly) posted it as a solution.
Nevertheless, I apologize, next time I'll put it in a comment or improve my answer, whichever the most appropriate.
wpte
5-Jan-12 17:33pm
View
code added... it works if I do it every second, but I want to have it continuously.
Don't ask me why I want that, I just do :)
The image is being edited with several filters with some OpenCL code. It's not an animation, it has to respond very quickly tho.
wpte
30-Sep-11 7:00am
View
Ah right... silly me.
I forgot I declared buf within the same function :)
I need a coffee :p
wpte
30-Sep-11 6:52am
View
Ok, I'm having problems with the delete []items part...
I have this in my header:
<pre lang="c#">
virtual ~buffer()
{
delete []items;
}
</pre>
but when I execute that using buf.~buffer(); glibc freaks out :p
I'm just storing constant integers in the buffer, not sure if I need to do that different.
glibc says: double free or corruption (fasttop): 0x0000000001f770c0
wpte
30-Sep-11 6:20am
View
Makes sense, thanks :)
wpte
30-Sep-11 6:08am
View
Ah thanks,
I've just implemented everything in the header file and it works great!
Thanks for helping me writing better c++ code :)
It's just, in all the tutorials I read so far on templates, they all implement them in the source file instead of the header file :)
wpte
30-Sep-11 5:56am
View
I appriciate your help RKnGI ;)
wpte
30-Sep-11 5:52am
View
I'm going to try this out... :)
Do you suggest that when I make other functions and methods that I should place them directly in the header file instead of the source file?
wpte
30-Sep-11 5:43am
View
Well I've implemented that...
But it still doesn't explain how to use a parameterized constructor in a template...
I mean... how can I say that MyQueue should be holding at most 10 T's?
Show More