all groups > dotnet interop > november 2006
Filter by week: 1 2 3 4 5
dll access error c# pass array of null pointers to c function
Posted by linknum23 NO[at]SPAM gmail.com at 11/29/2006 8:44:31 AM
Ive been trying to use the following function from the imaq.dll
library:
imgSequenceSetup(SESSION_ID sid, uInt32 numberOfBuffers, void*
bufferList[ ], uInt32 skipCount[ ], uInt32 startNow, uInt32 async);
Everything I've tried I've gotten the error "Attempted to read or write
protected mem... more >>
x64 com interop issue
Posted by param NO[at]SPAM community.nospam at 11/28/2006 11:48:16 PM
Hi all,
We have a com dll that was written in vb6. We registered the dll on
TESTSERVER1 (x86) using regsvr32 and then used tlbimp w/ net 1.1 to create a
proxy stub. We then called the proxy stub from a asp.net web service and all
worked well.
We now setup a x64 server TESTSERVER2. Regist... more >>
Cannot create COM instance at runtime
Posted by Mike D at 11/28/2006 3:25:44 PM
We're developing with a third party ActiveX component in VB.NET 2005.
I am able to create instances from the component using both early and
late binding if I run from within visual studio. However, when I build
the project and run the executable on the same machine I get an
exception.
Early ... more >>
Pointer/IntPtr to UCOMIStream?
Posted by Andreas Baus at 11/28/2006 8:56:38 AM
I'm currently trying to retrieve the RFT body of messages in Outlook
(from an app written in C#), and since that is, from what I gather, not
supported by the Outlook object model, I had to dig deeper into MAPI.
Now, I think I am on to something, but I am kind of stuck at one point:
It seems I ca... more >>
Invisible ActiveX control created using ATL
Posted by Nick Thompson at 11/27/2006 2:39:01 AM
Could you please help me create an Activex Control that is invisible at runtime
I have selected the invisible at run time option which results in
DECLARE_OLEMISC_STATUS(OLEMISC_RECOMPOSEONRESIZE |
OLEMISC_INVISIBLEATRUNTIME |
OLEMISC_CANTLINKINSIDE |
OLEMISC_INSIDEOUT |
OLEMISC_ACTIVATEWHENV... more >>
Native method that returns multiple strings
Posted by Tamas at 11/27/2006 12:00:00 AM
I need to call a method in a C DLL that looks like this:
void GetSuggestList(LPTSTR buffer, int size);
I need to pass a preallocated buffer to the method, which returns =
multiple zero terminated strings in "buffer", an empty string =
terminating the sequence of the strings.
How do I conf... more >>
Strong Name required
Posted by saravana via DotNetMonster.com at 11/27/2006 12:00:00 AM
Hi Jigar Mehta ,,
But I am using VS2003 .....
Where i have to mention the strong name( key value ) in assembly...
whether in assemblyinfo file or some other location ..
please provide write solution
Thanx in Advance
--
Message posted via DotNetMonster.com
http://www.dotnetmonster.... more >>
..... Error ...........
Posted by saravana via DotNetMonster.com at 11/25/2006 12:48:17 PM
Hi ,
cmdprompt>>sn.exe -k key.snk
cmdprompt>>Regasm asmname.dll /tlb:asmname.tlb
cmdprompt>>Gacutil /i asmname.dll
I am getting the following error....
Failure adding Assembly to the Cache
Attempt to install an Assembly without
a Strong name..
Please provide solution... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
BHO and IE scroll events (c#)
Posted by James at 11/24/2006 2:55:19 PM
Hi - I am reposting to this newsgoup as noone seems to be able to help in
the webbrowser_ctl group...
I am looking to catch scroll events from IE (from within my c# BHO). Getting
odd behavior so far, sometimes it starts to work (logs a few scrolls) then
it stops recording. All other events ca... more >>
Underlining Text in a Word Document
Posted by mihir.kotwal NO[at]SPAM gmail.com at 11/24/2006 11:57:44 AM
Code:
oWord.ActiveDocument.Range.InsertAfter(defword)
oWord.ActiveDocument.Range.InsertAfter(" -" &
defdef & vbNewLine)
How can I get the defword to be underlined while leaving the rest
without an underline?
Thanks in advance.
-Mihir
... more >>
problems with Word (COM)
Posted by Omega at 11/23/2006 9:18:37 PM
Hello
I am using COM object (Word) in my application, and I have two problems:
1) I open new instance of Word, with empty, new document. I hendle the
event DocumentBeforeSave. I would like to do something like this on this
event:
-save active document, but without showing the Save As dialog... more >>
Excel VB.Net add-in: InvokeMember using up 40% of CPU
Posted by mxbrunet at 11/23/2006 5:18:10 PM
Hello everyone,
I'm currently building an Excel add-in using VB.Net and am experiencing
some weird effects on one of my test machines. I am running a series of
demanding calculations on a sheet, and on the affected machine, when
profiled, it shows that System.RuntimeType::InvokeMember uses up ... more >>
Excel
Posted by PT at 11/23/2006 2:16:46 PM
Hi, I've tried googling but can't find anything regarding a cells value and
how to turn it into a string how's it's visualized within excel, problem
areas for me are any none string values obviously, is there an easy way to
get the cell value no matter what type it is into a string type as it'... more >>
External table is not in the expected format. OWC11
Posted by Ujval Shah at 11/23/2006 1:13:01 AM
Hi,
I am facing a peculiar problem. My Client Requirement is to Export and
Import Excel from and To DataSet for web Application using OWC.
Now Problem is When i Export file using OWC .. File's Extension is .xls but
it's XML Spreadsheet .. so when i am trying to import Extended Property=EXCEL
... more >>
Problems registering C# COM object manually
Posted by miikka.laakso NO[at]SPAM kaannos.com at 11/23/2006 12:27:07 AM
Whenever I try to use the class (in the normal C++) from the COM object
I get the "Class not registered" error. I have tried to register the
object with commands "regasm.exe MyModule.dll" and "regasm.exe
MyModule.dll /codebase" but neither of them doesn't work.
What is the correct way to regis... more >>
Unauthorised access exception using Web Browser control
Posted by Matt Adamson at 11/22/2006 4:28:27 PM
Not authorised exception using Web Browser control
Guys,
Not sure on the best forum for this.
We are getting an unauthorised exception when using the web browser control
as you can see from the call stack below
TestCase
'Tranmit.Sprinter.WebApp.Testing.Purchasing.Invoicing.Edit.E... more >>
ADODB Recordset Error On Sort
Posted by misterqj NO[at]SPAM gmail.com at 11/22/2006 2:41:30 PM
I am working on an application that integrates with another app that
exposes its database thru ADODB. I can get a recordset without any
trouble, but I get a strange error when I call db.sort = "field".
The error is:
An unhandled exception of type
'System.Runtime.InteropServices.COMException... more >>
Exception not caught when calling .NET DLL via (regular) ASP
Posted by goldeneye77 at 11/22/2006 10:46:44 AM
Hi,
I'm calling an exposed method of a .NET DLL via (regular/old) ASP using
COM Interop. This method that I'm calling then calls a .NET web
service.
Note that this web service I need to call does not yet exist but I am
testing error catching routines to make sure potential errors are
hand... more >>
calling a DLL-function from .NET including a function pointer within a class/structure
Posted by ms at 11/22/2006 4:03:43 AM
Hello all,
i have problems to implement a structure including a callback function
pointer correctly in C# .NET.
The structure is used as a parameter for a initializing function, which
is implemented in a C++ dll (unmanaged code) i want to use.
THEME: calling a DLL-function from .NET including... more >>
proper way to call a COM DLL
Posted by Darren Mar-Elia at 11/21/2006 6:03:25 PM
All-
I have a .Net 2.0 WinForms app. It references a COM DLL provided by MS. The
app works just fine on my dev machine but when I create a setup for it, and
run the setup on another system, I get an exception when invoking the
functionality that calls the DLL. The exception indicates that the... more >>
NetRemoteTOD DllImport
Posted by Steven Edison at 11/21/2006 3:20:28 PM
In C++, what am I doing wrong here? not sure how to get the "ref" for
BufferPtr in C++, there are thousands of examples out there for C# and
VB.NET, but so few for managed C++.
[StructLayout(LayoutKind::Explicit, Size=48)]
ref class TIME_OF_DAY_INFO
{
public:
[FieldOffset(0)]
unsign... more >>
I have problem whis Windows Media Services 9 Series.
Posted by vera esaulova at 11/21/2006 12:00:00 AM
I have problem whis Windows Media Services 9 Series.
I have videostream, which will consist of two streams(512k/bit and
256k/bit).I need to allocate a stream 256k/bit. In SDK is written:
Supporting Multiple Bit Rate Files
Several versions of the same audio or video content can be stored in
... more >>
question about opening SQL results in Excel from ASP.NET via XML
Posted by Mad Scientist Jr at 11/17/2006 3:44:44 PM
>From an asp.net web page I want the user to open the results of a SQL
query in Excel, as automatically as possible (ie not having to loop
through columns, rows, in code).
For this, dataset.writexml works great
(got the code from
http://forums.devx.com/archive/index.php/t-57273.html )
The ... more >>
how mutch memory aspnet_wp.exe must use
Posted by ruca at 11/16/2006 11:31:43 AM
Hi gurus,
Can anyone tell me please when I really must setup the value of memory that
aspnet_wp or w3wp must use in IIS server machine?
What I mean is that we have clients that have diferent specificatiosn in
their server machines that have IIS to runnning WebApplications. This can
chang... more >>
Callbacks in C++, with managed delegates...
Posted by TT (Tom Tempelaere) at 11/16/2006 6:56:02 AM
Hi all,
I have a problem with the project I am working on. Someone is coding a
driver in plain (unmanaged) C++, and it is required to subscribe a callback
for certain notifications. This driver is supposed to be used from a managed
environment though, so what I want to do is subscribe a man... more >>
REGDB_E_CLASSNOTREG error when accessing frames collection of IHTMLDocument2 on Windows XP via interop
Posted by PhilC at 11/16/2006 12:28:03 AM
Hi,
I've written some code to attempt to get the selected text from an HTML
document loaded in a running instance of IE. I need to be able to
access the frames collection of the IHTMLDocument2 interface so that I
can get text from the documents contained in the frames.
Here's what I've got:... more >>
COMException (0x80040154): Class not registered
Posted by Mihai P at 11/15/2006 11:17:47 PM
Hello,
My application fail to start on another computer. The exception is
thrown trying to call "InitializeComponent()" as you can see below:
System.Runtime.InteropServices.COMException (0x80040154): Class not
registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))
... more >>
Issue PInvoking GetTokenInformation using TokenElevation
Posted by Orlando at 11/15/2006 10:02:02 PM
Hi,
I need to reproduce the code here using C#/pinvoke:
http://blogs.msdn.com/cjacks/archive/2006/10/09/How-to-Determine-if-a-User-is-a-Member-of-the-Administrators-Group-with-UAC-Enabled-on-Windows-Vista.aspx
Unfortunately, my attempts aren't panning out - the returned values are off
fromw ... more >>
how to include the interop in my project
Posted by chintu at 11/15/2006 7:58:15 PM
in my windows application my re is to include in an project
... more >>
byte size packing in compact framework
Posted by Andrew at 11/15/2006 6:14:02 PM
If there is a better NG for compact framework interop then please let me know.
I am having a few issues marshalling structs to unmanaged memory whilst
trying to acheive the correct layout. Its a shame that the Pack parameter is
not supported in the compact framework.
I have a simple struct... more >>
ServicedComponent : IObjectControl::Deactivate()
Posted by Arif Khan at 11/15/2006 2:33:02 PM
I am getting folllowing error in one of the service components. I have not
override base class's (ServicedComponent ) Deactivate function. Also it's
library component called by asp.net worker process and I have not changed the
default object pool settings. Please advise.
Event Type: Error
... more >>
casting between interop imported COM interfaces
Posted by Kyle at 11/15/2006 9:35:36 AM
I am new to using .Net interop to access legacy COM server. I keep
getting a cast exception when I try to cast between imported
interfaces. Here is and example of what I am trying to do and how I
thought it was suppose to be done (ie I thought interop import dll
would handle casting between int... more >>
Does Marshal.GetTypedObjectForIUnknown add reference count to the COM object?
Posted by dotNeter at 11/15/2006 3:53:43 AM
Obj = Marshal::GetTypedObjectForIUnknown(pIUnknown, pTargetType); //
pTargetType is certain interface type
Did GetTypedObjectForIUnknown use QueryInterface to query the desired
interface?
My intent is using GetTypedObjectForIUnknown to test 2 interfaces can
inter-casting.
If succeed, wi... more >>
Enumeration in com interop
Posted by Kim at 11/14/2006 12:45:02 PM
Hi,
I have a .net class library which I want to expose to VB6. There is a public
enumeration in the .net namespace, and after com type library is created from
the .net dll, the enumeration elements end up having a prefix with the enum
name. I would like to know how to make the type library no... more >>
Com Interop
Posted by Nick Thompson at 11/14/2006 9:42:01 AM
I have created an invisible OCX control using MFC8.0 (to be loaded by WW
intouch)
I would like to call a .NET2 remoting method from this OCX and realise that
I MUST
not do it directly, VS displays CLR stability warning when I tried running
the control having compiled it with /CLR set
Is... more >>
deploying .net COM
Posted by James at 11/13/2006 11:44:37 AM
I have written a .NET (c#) COM object, which works great, however it is now
time to deploy it. If I copy the file to a target machine and run regasm on
it, all is great. If I deploy the application (using Installshield 11) all
is not great.
I realzie this may be a hybrid discussion for this... more >>
Using IntPtr for registry key constants
Posted by Sankalp at 11/12/2006 10:26:02 PM
Hello,
Am porting COM component(used by a VC++ app) to dotnet. Apparently, this
needs to be called by the existing app.
The existing signature in COM
HRESULT ReadRegStr(DWORD hKey, BSTR bstrSubKey, BSTR bstrValueName, BSTR*
pbstrResult);
..NET signature:
public string ReadRegStr(Int32 ... more >>
How to use ICustomMarshaler
Posted by MoriCristian at 11/11/2006 11:33:02 AM
Hi all.
I'm trying to write a simple custom marshaller.
public class MyFirstMarshaller : ICustomMarshaler
{
public static ICustomMarshaler GetInstance(string Cookie)
{
return(new MyFirstMarshaller());
}
public void CleanUpManagedData(ob... more >>
Excel Automation
Posted by Kaustav at 11/11/2006 5:36:01 AM
Hi,
I am facing a peculiar problem with Excel Automation. I have a winform where
in I display some data in OWC axSpreadsheet. Next I export this data to an
..xls file. When I try to open (through OleDb) and read this file, I get an
error -
"External table is not in the expected format." ... more >>
VB.Net XML Comments and Intellisense for COM?
Posted by TCook at 11/10/2006 12:29:22 AM
Hey All,
I have added my XML comments to my VB.Net solution and from within VS2005
they show up quite nicely in the Object Browser, etc.
However, when the class library is referenced from a COM app, the procedure
attributes do not show up.
Is there a way to fix this?
Thanks,
TC
... more >>
How to dected if file is used by another process
Posted by Marek Suski at 11/10/2006 12:00:00 AM
Hi,
I am looking for a fast Win32 code solution for detecting if file is used by
another process (aka locked). Right now I am using following code but it
throws errors that I catch. Is there something faster and cleaner?
/// <summary>
/// Determines whether [is file locked] [the specified... more >>
Marshalling VB6 Type
Posted by Philipp Brune at 11/9/2006 6:36:09 PM
Hello newsgroup,
i have the following problem and i hope someone is able to either tell
me how to solve it or to tell me that it is even not possible :
Given an VB6 ActiveX DLL (Common.dll) that defines the following public
type
Public Type T_DEMO
ID As Integer
Value as String
En... more >>
c# interop webservice
Posted by Berger at 11/9/2006 4:58:33 PM
Hello
I have a c# console application who generate a new excel file vie Interop.
All works fine.
Now I want to move the code in a c# webservice. When I try to build an
instance of the excel object I got an Access Denied exception. I think it is
a security config problem. But I don´t know ho... more >>
Extract Interop file from DLL by VB.NET code
Posted by Carmine Cairo at 11/9/2006 4:02:03 AM
Hi all,
I'm newbie on this NG.
I have a basic question for the expert programmers.
I use VB .NET by 3 months about.
When I want use a factory COM dll in my program normally I follow this
steps in Microsoft Visual Basic .NET Development environment:
1) Add Reference ...
2) Browse for the c... more >>
Using IntPtr help
Posted by Andre Azevedo at 11/8/2006 9:20:24 PM
Hi all,
I need to call an unmanaged function that accepts a void* parameter.
To call the function I use an IntPtr object using Marshal.AllocHGlobal:
[DllImport ...]
public static extern int ExampleFunction(IntPtr p, ref int size);
....
int size = 0;
IntPtr p = Marshal.AllocHGlobal(512);
... more >>
Marshalling **IUnknown
Posted by Sean McGinnis at 11/8/2006 9:45:49 AM
Does anyone know the correct way to marshal the second parameter based
on this definition?
HRESULT Next(
[in] ULONG celt,
[out, size_is(celt), length_is(*pcFetched)]
IUnknown **ppObjectArray,
[out] ULONG *pcFetched
);
Thanks for any help!... more >>
converting char* to string gives strange characters
Posted by Rob Tillie at 11/8/2006 12:16:01 AM
Hi,
I'm calling a method from a C dll which I have defined as follows:
[DllImport("avpzip.dll", EntryPoint="VERIFY_ZIP",
CharSet=CharSet.Ansi,
ExactSpelling=false,
CallingConvention=CallingConvention.StdCall)]
public static extern int Verif... more >>
Side-by-side examples
Posted by Suds at 11/7/2006 5:34:03 PM
Hi,
I need some pointers to resources that have sample code/examples on how to
create and deploy side-by-side assemblies.
I have a collection of binaries that are developed in VS2005. Currently, our
system registers these binaries and uses COM to interact with them.
I was looking into deployi... more >>
Mshtml interop problem
Posted by Vincent Finn at 11/7/2006 3:51:38 PM
Hi,
Not sure if this is the right group for this but I think it could
loosely be described as an interop problem since it is the interop dll
I can't get to work.
Can anyone tell me how to install the Microsoft.mshtml.dll correctly?
I am running VS2005.
I have a C# project which uses msht... more >>
Can mshtml render printed pages to something besides the printer
Posted by Thomas Taylor at 11/7/2006 12:50:02 PM
I would like to have mshtml render an html document for me with a print
template applied to set margins, header, and footer. Specifically, I would
like to have it render each 'print' page to something like a metafile that I
could then save, send to a PrintDocument, or whatever.
IHTMLElemen... more >>
|