|
|
I'm using a native C++ extension DLL in a MFC 7.0 application.
The native DLL shows a dialog through DoModal using a dialog resource.
DoModal produces an assertion (at GetResourceHandle() and GetModuleHandle()),
How can I solve the problem?
|
|
|
|
|
I have created one dll called as mydll.dll and added following code for security.
Imports System.Security
Imports System.Security.Permissions
'<assembly: strongnameidentitypermissionattribute(securityaction.demand,="" _
'="" publickey:=" 0, 36, 0, 0, 4, 128, 0, 0, 148, 0, 0, 0, 6, 2, 0, 0, 0, 36, 0, 0, 82, 83, 65, 49, 0, 4, 0, 0, 1, 0, 1, 0, 59, 217, 201, 231, 35, 199, 134, 255, 210, 242, 120, 184, 173, 106, 168, 25, 233, 75, 135, 27, 198, 104, 243, 255, 116, 171, 230, 227, 14, 186, 202, 180, 166, 31, 199, 105, 19, 183, 203, 186, 83, 15, 8, 108, 71, 2, 27, 122, 149, 96, 237, 175, 87, 48, 90, 226, 156, 236, 188, 158, 21, 99, 189, 226, 1, 195, 186, 247, 5, 241, 110, 117, 214, 187, 67, 38, 78, 6, 225, 254, 186, 29, 238, 199, 138, 190, 183, 151, 173, 180, 134, 177, 105, 72, 57, 240, 11, 154, 12, 245, 30, 179, 238, 108, 120, 155, 8, 87, 23, 18, 82, 161, 8, 93, 255, 147, 70, 166, 219, 55, 3, 134, 79, 155, 236, 118, 33, 163 " )="">
Public Class MyClass1
Public Sub New()
MsgBox("new Class" & Now.Today)
End Sub
End Class
Now no one can access the code. but while development how can i remove the security.
Sachin D. Thamke
Pcs Technologn
|
|
|
|
|
Hi there!
I want to encrypt an XML-file using c#. So far everything works fine. Only the solution of saving the private Key in a safe place makes difficulties.
Heard about saving the private Key in the Registry, but for some reasons i can not find good examples on that. The only page i found is this (http://www.codinghorror.com/blog/archives/000501.html). I just don't get what he wants to tell me... Do i need a pfx-File... Eventhough i only want to save a private key...? How do i generate such a file?
Can anyone help?
|
|
|
|
|
Hello,
There's a problem that I encounter when trying to implement database transactions
over multiple webservices. The thing I try to accomplish is trying to make three
webservices (startTransaction, commitTransaction and rollbackTransaction).
The idea behind this is that i could start a transaction serverside, calling some
webservices which do some database updates and consecutive to that call the
commitTransaction or rollbackTransaction webservice to commit or rollback the transaction.
The thing I tried is to put the transaction object in the session but this didn't work.
So my question is, is the thing I want possible or isn't it the best practice to do ?
thanks in advance.
Greetings from Holland
|
|
|
|
|
I'm trying to using a component developed using .NET 2.0 with a .NET 1.1 Windoes Forms application, I'd installed the .NET 2.0 Framework on the machine but still when to add reference to the new component have the following Error message: "D:\NewComponent\Debug\myComponent.UI.Win.dll' is not a Microsoft .NET module."
do anybody have any idea how to solve this?
Mohammed Derbashi
|
|
|
|
|
You CANNOT use a .NET2 component in a .NET1 application without severe hacking (e.g. "patching" your own 1.1 CLR).
You could, however, try to recompile that component for 1.1 and make the necessary code-changes to make it work.
Cheers,
Sebastian
--
Contra vim mortem non est medicamen in hortem.
|
|
|
|
|
created a sample VC++ Console Application with no line of code added to it, other than built in "Hello world print statement".
But when trying to run, the application it gives the following error.
------ Build started: Project: prjTest, Configuration: Debug Win32 ------
Compiling...
stdafx.cpp
Compiling...
resource.h
resource.h(4) : fatal error C1010: unexpected end of file while looking for precompiled header directive
AssemblyInfo.cpp
prjTest.cpp
Generating Code...
when i set to, "not using precompiled header" option, the program is working perffectly.
when i try "Create Precompiled header", option. It gives the following error.
------ Build started: Project: prjTest, Configuration: Debug Win32 ------
Compiling...
resource.h
resource.h(4) : error C2857: '#include' statement specified with the /Ycstdafx.h command-line option was not found in the source file
AssemblyInfo.cpp
prjTest.cpp
can anyone please explain me on this.
invinJerry
|
|
|
|
|
hi all.
im trying to view contents of my xml file into a combox and textboxes and i wont to write/delete to it aswell. having no luck..plz help
|
|
|
|
|
Here is one method
First read xml into a dataset
like
DSet.ReadXml("somefile.xml");
Once you have got the dataset, you can bind it to a combobox or textbox.
|
|
|
|
|
Hello Folks,
I've got a simple newbies question:
How do I paint an Icon on my Form (Win CE, Framework 1.1, C#)?
I know how to do it with a bitmap but I need some "transparent" parts ....
Anyone care to help me out?
Best regards,
Marco
|
|
|
|
|
Hi guys,
I'm attempting to migrate a Java application to the .NET framework. This Java application uses some C++ code to provide functionality not present in either the Java framework library or the .NET framework. Java makes these calls via Java's JNI technology. For example:
// The C++ code:
JNIEXPORT jint JNICALL Java_xyzMedia_util_MyControl__1getSpectrumLength(JNIEnv *env, jclass jcl)
{
...
}
// The Java code that calls the native method:
native static int _getSpectrumLength();
How do I call this function using .NET's P/Invoke technology?
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Connor's Christmas Spectacular!
Judah Himango
|
|
|
|
|
Nevermind, I figured it out. In case anyone's interested, here's what had to be done:
extern "C" _declspec(dllexport) int _getSpectrumLength()
{
...
}
native static int _getSpectrumLength();
Obviously some of the C++ methods had to be modified to remove any dependencies on the JNIEnv* and jclass parameters passed to them under JNI, since they aren't passed to them using P/Invoke, but most of the work was quite simple and straightforward.
|
|
|
|
|
I have bought/read:
- Windows System Programming 3.rd Ed.
- Windows Internals (XP/2003/2000)
- Network programming in .Net
but still can't find any good source of info on how
programatically a router/gateway works.
I want to understand how I can create a windows based router/gateway from scratch using the latest windows technology (.Net 2.0/WinFX).
Please explain and point to some good qualified URL's or books.
I pay $50 on Google for a good answer: http://answers.google.com/answers/threadview?id=701080[^]
TIA
|
|
|
|
|
Get youself a book on TCP/IP and learn C/C++/MFC/win32
|
|
|
|
|
Thanks mate
|
|
|
|
|
Hi all,
I want to create a window system service that sits on the background and just fire another service/executable (i.e, notepad) every time a new user fast switches to a new session. How can I start a new process in another user sessions in WinXP using .NET 1.1 or 2.0? also how can detect the event of user fast switch to a new session?
thanks in advance...
|
|
|
|
|
Hi!
For detect the event of user fast switching use callback HandlerEx
|
|
|
|
|
Could any one help me in getting the
microsoft .net passport sdk
Is there any download link for it please help me out.I need this sdk for development for a site
www
|
|
|
|
|
I want to create assembly that contains dataset. If I build the dataset then everyone reference to my assembly, that person can use my dataset class to modify my database.
Now I want to protect that assembly or dataset class so only my application can use that assembly. If someone reference on it, it will blocked. (I don't one someone modify my database using application that reference to my assembly).
Thanks.
Simple mind programmers, I don't need a complicated mind.
|
|
|
|
|
A simple way to protect the assembly is to make all classes "internal".
If someone references it, he won't be able to call any method or to instantiate any class.
Like all simple things, it is no perfect protection. The other coder could still use reflection to find the classes/methods an call them, even if they are "private".
_________________________________
Please inform me about my English mistakes, as I'm still trying to learn your language!
|
|
|
|
|
Corinna John wrote: A simple way to protect the assembly is to make all classes "internal".
The problem is when we use internal then we can only access the class only on that assembly. If we set protected then we can derived it than we use it. So the both is not good on protecting our assembly from referenced by someone. And also I need that class and method on public so that I can reference my class on that assembly.
I prefer using the "Strong Name Key" rather using internal or protected. But the problem is that everyone example is build or coded under VS 2003 and Framework 1.1, now I develop under VS 2005 and Framework 2.0. It seem more complicated (or I maybe not understand signig under Framework 2.0) to set the "Key" on it.
So I suggest you don't use internal or protected to protect the code.
Thanks anyway.
Simple mind programmers, I don't need a complicated mind.
|
|
|
|
|
Maybe this can help:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconlicensingcomponentscontrols.asp
|
|
|
|
|
|
hi all,
a have two console apps runing on local computer, and i need them to interact.
at the first glance - i need implement remoting - in "serverA" i exposed class
Client and in "serverB" I accessed it by remoting.
the problem is - in "serverB" i see Client object as naked one, that meens, that
i can't access the running things [references] in "serverB" - configuration file, object that
holds DB connection, etc. first i thought that it is goot idea to SetData/GetData
in AppDomain, but i don't get references to existing objects - just values.
so how to have references in remotable object?
thanks in advance
|
|
|
|
|