Hi All,
My requirement: I want to use TestDll.dll(ATL COM DLL, Threading Model -
Apartment, Interface - Dual and Aggregation - Yes) in ASPX pages.
I created type library for TestDll.dll (ATL COM DLL) using tlbimp
from VS2005 command prompt. Output is TESTDLLLib.lib(.NET Assembly). It has
only one function which is CreateFileInCDrive(). It just creates one text
file in C
Drive.
code snippet:
STDMETHODIMP CMyTest::CreateFileInCDrive()
{
// TODO: Add your implementation code here
FILE* fp = fopen("C:\\TestDll.txt","w");
if (fp != NULL)
{
fprintf(fp,"%s","welcome\n");
fclose(fp);
}
return S_OK;
}
I created asp.net website project and selected code behind as visual c#. I
would like to use atl com dll (TestDll.dll) in Page_Load event. Is it
possible?
In Visual C#, (i mean page_load function) I am able to create object.
But, I cannot create the TestDll.txt file.
I can use this TESTDLLLib.lib in Visual C# Console application. But, it is
now working fine in asp.net with visual C# application. What might be the
problem?
Please suggest me.
Is it correct approach?
--
Thanks & Regards,
John. 1 1552
John wrote:
Hi All,
My requirement: I want to use TestDll.dll(ATL COM DLL, Threading Model -
Apartment, Interface - Dual and Aggregation - Yes) in ASPX pages.
I created type library for TestDll.dll (ATL COM DLL) using tlbimp
from VS2005 command prompt. Output is TESTDLLLib.lib(.NET Assembly). It has
only one function which is CreateFileInCDrive(). It just creates one text
file in C
Drive.
code snippet:
STDMETHODIMP CMyTest::CreateFileInCDrive()
{
// TODO: Add your implementation code here
FILE* fp = fopen("C:\\TestDll.txt","w");
if (fp != NULL)
{
fprintf(fp,"%s","welcome\n");
fclose(fp);
}
return S_OK;
}
I created asp.net website project and selected code behind as visual c#. I
would like to use atl com dll (TestDll.dll) in Page_Load event. Is it
possible?
In Visual C#, (i mean page_load function) I am able to create object.
But, I cannot create the TestDll.txt file.
I can use this TESTDLLLib.lib in Visual C# Console application. But, it is
now working fine in asp.net with visual C# application. What might be the
problem?
Please suggest me.
Is it correct approach?
Sounds like something trivial - write permission for the web app or
something like this. By the way - why didn't you do the standard
approach - with [DllImport("TestDll.dll")] + wrapper function and etc...
HTH
Petar, http://a-wake.net This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: none |
last post by:
Hi. I'm implementing a web deployment using 9i. I have a table for STOCK,
which has one or more PURCHASES, which have one or more PURCHASE_ITEMS.
When a purchase item is INSERTED, I'd like the...
|
by: clintonG |
last post by:
Briefly stated, my problem is accessing and 'setting' properties of a label
control declared in the template of another control noting that the other
control is an instance of the beta 2...
|
by: Serious_Practitioner |
last post by:
Good day all, and thank you in advance for your help. No - MANY thanks in
advance for your help - I know nothing about using databases on Web servers.
I am about to discuss a project with a...
|
by: Charles Stanley |
last post by:
Hi all,
I'm new to C#, and have two pretty simple questions:
I have a class, in a .cs file by itself. I need to make use of the sole
function in this class in another .cs file. Here's the...
|
by: Stephen Adam |
last post by:
Hi there,
I've just started a c# project at work where I cannot use Visual Studio. I
am trying to pass variables from one form to another. When I try to create
an instance of the sending class...
|
by: khubieb |
last post by:
Simply I am trying to use RSACryptoServiceProvider to generate a key
pair, send the public key to a service that will retrieve me data,
encrypt it with my public key, send the encrypted data back...
|
by: Eugene Anthony |
last post by:
The problem with my coding is that despite removing the records stored
in the array list, the rptPages repeater
control is still visible. The rptPages repeater control displayes the
navigation...
|
by: nyathancha |
last post by:
Hi,
I am using WSE to implement security using x509 certificates. This
works when I use a windows client but throws an exception when I use
NUnit.
My Code looks as follows :
UsernameToken...
|
by: KevinADC |
last post by:
Note: You may skip to the end of the article if all you want is the perl code.
Introduction
Uploading files from a local computer to a remote web server has many useful purposes, the most...
|
by: AnuSumesh |
last post by:
Hi All,
I want to call RDP on Page load and it is working fine.My code is in C#.
But I am unable to perform following functions
1. when i disconnected from RDP, i want to go back to...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
| |