|
Hi,
i am using 4 dlls all build with .net 2.0 and calling them from vb application. the vb application calls the dlls then when control returns to vb app again then it stops unexpectedly. i think it is compatibility issue. but dont know how to resolve.
Thanks.
Saswat
|
|
|
|
|
Hi,
all modules in a single app should be based on a single Framework version;
you should not expect a 2.0 EXE to run happily with a 1.1 DLL or vice versa.
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
yes i know that and that is not the problem. all the dlls are built with 2.0 and vb calls them. control switchs between managed and unmanaged code. and the vb application stops in between unexpectedly.
Thanks.
Saswat
|
|
|
|
|
Hi,
my application grabs an image from a camera. The image might be quite big such as 50MB.
The image is represented as a bitmap image with BITMAPINFO as the header and the image data right after that.
I have a COM object (writen in native code) which my WPF application uses that holds the image.
This COM object can return byte* as the pointer to the image.
Is there any way to use the .NET image component or other .NET component that will get just the pointer to my image (byte*) and without copying the whole image to .NET component?
Thanks,
Dudi
|
|
|
|
|
Dudi Avramov wrote: Is there any way to use the .NET image component or other .NET component that will get just the pointer to my image (byte*) and without copying the whole image to .NET component?
Nope. AFAIK, the image data must be copied into an object (preferrably decending from Image) on the managed heap for it to work.
|
|
|
|
|
Hi!
I need create a dll in VC++ and use in C#... But i can´t make this work
I made a new project:
New project > Visual C++ > CLR > Class Library
And write the files above, but when i import to C#´s project i can´t see the "test" function
So, anybody can help me?
Thank´s for the attention!
//########[Tsai7.cpp]########
#include "stdafx.h"
#include "Tsai7.h"
#include "math.h"
using namespace Tsai7;
public class Tsi
{
public: int test(int valor)
{
return valor;
}
};
//########[Tsai7.cpp]########
//#########[Tsai7.h]#########
#pragma once
using namespace System;
namespace Tsai7 {
public ref class Class1
{
public:
test(int valor);
};
}
//#########[Tsai7.h]#########
Rui Sousa
|
|
|
|
|
Have you got this working?
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
VS2005/.Net 2.0
Windows desktop (as opposed to a web app)
I am writing a service in which I want to support one or more ways to perform a specific task. I intend to write one or more DLLs (assemblies I guess you call them), each of which will implement a common interface, but with the goal of accomplishing the task. The desired outcome is to allow development of additional DLLs without having to change/recompile the service.
Each DLL will have a class, and optimally, that class would have the same name in each of the DLLs.
Finally, as a DLL is needed, the application/service would load the DLL, and then unload it when it's no longer needed.
If I can do this, can anyone point me to a place that describes how?
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
You'll need to use reflection ... you load up the assembly, then load up each type in the assembly. You'd normally use a custom attribute to label your plugin classes for easy "spotting" of them although base classes and interfaces can be used too.
The only way to unload an assembly is to unload the entire AppDomain, so if you really need this functionality then you need to spawn new AppDomains and load the plugins into them. THis has advantages and disadvantages. For the pro's you have the fact you can unload the assemblies and you can set the security on the AppDomain to be very restrictive and so use it as a sandbox. The con is that anything crossing an AppDomain boundary has to be serialized and so incurs a performance penalty.
If this is a long running service and there are large number of plugin changes, or you will have "untrusted" plugins, then you'll probably want to go the AppDomain route. If the service will be restarted occasionally or there will only be occasional plugin changes and you fully trust them then loading in to the current AppDomain would be best.
I don't have any articles to hand that cover all these areas as I've been dabbling with this stuff for a few years now and know enough just to look up the exact info when I need it. If you search around though you should find a good body of info, and with the pointers I've provided you can hopefully avoid some of the pitfalls that often appear (with unloading).
|
|
|
|
|
This[^] might help give you some ideas.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hi everybody!
I have a C# application that uses Magicknet library.
http://midimick.com/magicknet
MagickNet is an API for the ImageMagick library, wrapping the functionality into the CLR for access by the .NET languages.
This application works OK in Windows XP SP2 + Visual Studio.NET 2005.
But in Windows Server 2003 SP1 + Visual Studio.NET 2005, I received this error:
Could not load file or assembly 'MagickNet, Version=1.0.0.3, Culture=neutral, PublicKeyToken=null' or one of its dependencies. This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem. (Exception from HRESULT: 0x800736B1)
I have installed vcredist_x86.exe in this computer.
Please help me.
Best regards!
|
|
|
|
|
Hi,
I am new in .net webparts.Plz any one help me How to crate webparts and how apply the web parts in asp.net applications.If any sites regarding this Topics send me URLS.
Thanks & Regards
Suvarna.P
P.Suvarna
|
|
|
|
|
|
i'm looking for some sort of ppt or doc files that nicely present "what should i start to learn asp.net(or .net)? "
what should beginners do to learn .net?
does anybody have any kind of information that i can train my students where to start?
it would be really nice if it arranged by file forms.
|
|
|
|
|
I'd teach a .NET language first, given that ASP.NET is a framework that relies on C# or VB.NET.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I'd recommend the following order:
- The basics of object oriented programming
- The .NET Framework itself (the fundamentals of the CLR and the base class libraries)
- C# or VB.NET, whichever your preferred language syntax is (Ultimately this just boils down to a preference of syntax)
- ASP.NET
I don't know of any PowerPoint slides or Word documents for this, but you can look at any of the O'Rielly books for good reference materials.
|
|
|
|
|
Hi Bigeyed,
Rather than create a Powerpoint deck, I thought I'd answer your question here.
There's several great ways to get started doing ASP.NET[^] development. For me, it depends on your style of learning. My first suggestion is to have a project in mind that you want to learn how to write. For me, that's been an important key to learning. Then it's about finding a good way to learn. But the end result should be writing code, slowly working your way to build that cool project you have in mind.
One cool place to start with is on the ASP.NET website itself. There's a set of videos on Getting Started with ASP.NET[^]. There's also starter kits there too. And there's online labs. If you have a broadband connection, you can try out ASP.NET virtual labs[^] without having to install anything. View webcasts and try it out online.
There's book learning. If you have access to a bookstore, I suggest thumbing through the book and find one that makes sense to you. There's instructor led training, web casts, videos, podcasts, and more. But the goal is writing display and implementation code.
There's several parts in learning ASP.NET. The first is having a good understanding of HTML. ASP.NET is built on top of HTML and then tied to a programming language, such as C# or VB.NET.
So the next step is to be grounded in the language and how to use it. There's a lot of good books out there that show how to do it step by step. For example, O'Reilly has Learning C# 2005, 2nd Edition[^]. I've found O'Reilly books excellent and pretty affordable. Another choice is Beginning ASP.NET 20 with C#[^]
If you are brand new to programming, you can get ahold of Visual Studio Express[^]. It's free and a great way to start. When you start walking though the site, you can find the Beginner Development Center[^] There's three tiers for web development there on the site to get you started.
Next there's some great books to learn how all the pieces fit together. A few years ago I taught .NET 1.0 development to programmers using a great book by Amit Kalani, MCAD/MCSD Training Guide (Exam 70-315): Developing and Implementing Web Applications with Visual C# .NET and Visual Studio .NET[^] That particular book is now a little out dated if you want to learn the .NET 2 and beyond. For the newer technology, you might want to check out either MCPD Self-Paced Training Kit (Exam 70-547): Designing and Developing Web-Based Applications Using the Microsoft .NET Framework[^] or Matthew MacDonald's book Beginning ASP.NET 2.0 in C#: From Novice to Professional[^]
There's courses available at Microsoft Partner Readiness[^] Some courses are live and available at a nominal cost. Others are free webcasts that show step by step how to develop your applications. And there's events around the world. You can also attend free MSDN Events[^] that showcase emerging technology.
Microsoft Certified Trainers have programs all over the country. When you look at the Microsoft Training site[^] you'll find all kinds of courses, books, and materials. In addition, you'll find a program for Microsoft Official Distance Learning (MODL) Courses[^]
I'm not sure what you meant by arranged by file forms. I think you mean that when you launch Visual Studio, you choose a project type, then add items that use a Visual Studio template. These can be Text File, Style Sheet, XML Schema, etc.
I recommend learning them in some sort of order. First, a good base in HTML. And then C# or VB.NET classes. You can combine those together to create an ASP.NET page. Add cascading stylesheets. The rest as they are introduced to you.
One final note on a study goal. For me, the best step that I took was working toward completing a Microsoft Certification Professional[^] exam. I recommend following the courses offered for the Microsoft Certified Technology Specialist (MCTS)[^] for Web applications. Once you understand the material for this exam, testing will assure you and those around you know the topic inside and out.
Best wishes in your endeavor. I hope this helps.
(PS.. one quick note. There's a lot of work at Microsoft going on around dynamic languages, such at Iron Ruby[^]. My path has been along the traditional enterprise architecture, but a lot of people are exploring this avenue as well.)
-- bruce
Microsoft ISV Advisor
Check out http://blogs.msdn.com/usisvde/ for the latest technologies for independent software vendors (ISV's).
|
|
|
|
|
Till .NET Framework 1.1, the zip and unzip functioanality was either achieved through ThirdParty (like XCeed) or Opensource (SharpZipLib) or J# (java.util.zip). I just noticed that there is a class called System.IO.Compression in .NET Framework 2.0.
I was just wondering if this would support zipping of folders also like SharpZipLib without affecting performance. I am particular about this for the reason that a quick Google search of J# component indicates that it is a bit performance hog on the servers.
Any one can help on this?
|
|
|
|
|
Have a look through the System.IO.Packaging namespace.
|
|
|
|
|
Mark Churchill wrote: System.IO.Packaging
Thank you, Mark. I learnt that it is part of .NET Framework 3.0 (WindowsBase.dll) assembly. I would try to play around it a while sometime.
|
|
|
|
|
Hi all,
I have a VB2.0 Winforms app that runs from about 9am until about 11pm every day analysing a live datafeed and then doing certain actions depending on the data. (It's an automated betting system for horse racing in case you're curious).
What I want to be able to do is to have some semblance of control over the app via my web server for when I am not home but need to check on the app's status or feed it a certain command to change it's behaviour. (I don't need to see the app itself so I'm not looking for a VPN/VNC type solution).
Since I also have my own web server I am thinking about building a private/secure web site which can read or write to the various SQL Server 2005 tables the app also uses. In this way I could interrogate data being created by the app (bets and results written to the DB) over the web (via stored procs run by clicking on links) and also issue commands via the website that could be written to another SQL table or XML file that the app could then check for, say every minute or so via a timer.
To give a real example - sometimes the data feed needs a gentle prod to download the latest data (which I can request via an API in the app) so I could have a status page on the web that displays the last time of the downloaded datafeed and a button to tell the winforms app to request an updated datafeed. The app would then check the "Events" table every minute or so, see that a new command to refresh the data had come in and call that method in the datafeed API. (This is a pretty simple example - I have more complex things I want to do with an interface of this sort.)
Given the app, the SQL DB and the web server are all on one machine is this the best way to do this sort of thing? Are there any nice .Net tools I don't know about to assist with this sort of (admittedly strange) type of remote interface? Should I be thinking about web services or just keep it simple and read/write SQL tables and/or XML files from both the app and the web site?
TIA for any input, comments etc - just interested if anyone has any recommendations or can see any problems with doing this sort of thing.
Mike
|
|
|
|
|
The Windows Form Application can query the Web Server at periodic intervals through a WebService right?
|
|
|
|
|
You may want to think about using technologies like SqlDependency or Notification Services in SQL Server 2005. Alternatively, take a look at Windows Communication Foundation or Remoting to exercise more direct control over the application.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Thanks - they both sound like good alternatives... I'll have to do a bit of research.
At the moment I am just doing it very simply where I write an event to a table from the web site then a timer in the app checks the table for any new entries every minute... seems to work well for what I need so far.
|
|
|
|
|
It's very irritating.
I compile the project, go to browser and do the refresh. Server (localhost) takes a long time to respond and sometimes throws a debug window to choose the debugging IDE so I must refresh again, and sometimes it works like nothing happened.
It just happened with no reason.
Everything was OK, and suddenly when I compile it and refreshed it, I get the error.
With almost every compile, I get debbuging windows that tells me to choose the IDE for debug.
Event Viewer logged this:
EventType clr20r3, P1 aspnet_wp.exe, P2 2.0.50727.42, P3 4333aece, P4 eposlovi, P5 1.0.0.0, P6 46d30c6c, P7 a, P8 6, P9 system.nullreferenceexception, P10 NIL.
aspnet_wp.exe (PID: 4456) was recycled because it failed to respond to ping message.
aspnet_wp.exe (PID: 1120) stopped unexpectedly.
An unhandled exception ('System.NullReferenceException') occurred in process #5852. Just-In-Time debugging this exception failed with the following error: The process ID is invalid.
How can I fix this irritating problem?
Thanks a lot.
|
|
|
|