|
Can you debug into square_in_C() to see if the function is being called?
su_penguin wrote: Declare Function square_in_C _Lib "C:/PATHTOFILE/debug/MyXLib.dll" (arg As Double) As Double
Have you verified via Depends or Dumpbin that the exported function is named as you think it is?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
I can't exactly call the method to debug in the DLL because there isn't a main method.
And i've tried using Dumpbin.exe at the cmd line and I get:
This application has failed to start because mspdb80.dll was not found.
|
|
|
|
|
su_penguin wrote: I can't exactly call the method to debug in the DLL because there isn't a main method.
What does a lack of main() have to do with it? Using something as antiquated as fprintf() (either to a file or the screen) would suffice.
su_penguin wrote: And I've tried using Dumpbin.exe at the cmd line and I get:
This application has failed to start because mspdb80.dll was not found.
It sounds like an environment variable/path issue. Copy (temporarily) dumpbin.exe to the folder containing mspdb80.dll. See here for more.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
su_penguin wrote: C:/PATHTOFILE/debug/MyXLib.dll"
Will VBA understand forward slashes? Can you call the function in the DLL from VBA?
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
I'm pretty sure you use the forward slashes. I've tried it with the backslashes, but I still get the same result. I think this is unrelated.
Also, "Can you call the function in the DLL from VBA?"
I'm not sure what you mean...
|
|
|
|
|
In the module where you declare the DLL function, add a public subroutine like this:
Public Sub Test
Dim a as Double
a = square_in_C(10.0)
End Sub
Now, in the VBA editor, put the cursor on that subroutine and press F8. That'll cause the VBA debugger to step into the subroutine and you can check that it calls the DLL routine correctly.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Have you tried formatting the cells to Number? Sometimes that might be the issue. Debug and ensure that the call made properly returned the correct value.(Sorry don't ask me tips for debugging these kind of issues as I never debugged in such environment)
-Sarath.
"Great hopes make everything great possible" - Benjamin Franklin
|
|
|
|
|
Hi!
I'm learning to work with webservice, and now I have a problem..
I'm using this guide:
http://www.exforsys.com/tutorials/asp.net/creating-and-consuming-xml-web-services-with-csharp.html[^]
When I try to compile my console-application, this message appears:
Error 1 The type or namespace name 'Service1' does not exist in the namespace 'MyClient.MyService' (are you missing an assembly reference?) C:\Documents and Settings\Bryan\Mina dokument\Visual Studio 2008\Webbservice\MyClient\MyClient\Program.cs 15 23 MyClient
Error 2 The type or namespace name 'Service1' does not exist in the namespace 'MyClient.MyService' (are you missing an assembly reference?) C:\Documents and Settings\Bryan\Mina dokument\Visual Studio 2008\Webbservice\MyClient\MyClient\Program.cs 15 56 MyClient
The code får my webservice is:
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Xml.Linq;
namespace WebServiceExample
{
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[ToolboxItem(false)]
public class Service1 : System.Web.Services.WebService
{
[WebMethod]
public string HelloWorld()
{
return "Hello World";
}
}
}
The code for my console-application:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace MyClient
{
class Program
{
[STAThread]
static void Main(string[] args)
{
MyService.Service1 service = new MyService.Service1();
string message = service.HelloWorld();
Console.WriteLine(message);
}
}
}
The console-application is supposed to interact with my webservice. The message "Hello world" should be ouput in my console. But it dosen't work..
Help?
|
|
|
|
|
Bryan Karlsson wrote: Help?
I'd suggest asking in a more[^] appropriate[^] forum[^].
Also, I'd suggest telling people what error messages you get.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
My WinXP machine is configured with 2 NICs. I create one socket with INADDR_ANY and the port that both cards need to listen to. Then I add membership twice with the shared multicast address and each cards' unique interface address. This does exactly what I want, which is duplicate data (so that one can provide a backup for the other).
Unfortunately, the winsock recvfrom() only gives the address from which the packet came from. Is there any way to identify which interface in my machine actually got the data?
Thanks in advance!
|
|
|
|
|
Can't you create 2 sockets for the two NICs binding to their IPs? Then you could distinguish between the two, no? Also, how about creating a raw socket? This would give you the whole packet, not just the data and you could analyse it to find out where it came from i guess.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
I tried that first. Unfortunately it doesn't work as needed because one appears to "hijack" the other. If you unplug one NIC you no longer get data on the other one. This is not an acceptable solution, so I implemented the way mentioned above. This is the only way to allow them both to get data regardless of the connection status of the other card.
|
|
|
|
|
How about raw sockets?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
I tries this too, but it still doesn't give me the information I need. The Dest. addr comes back as the multicast address it was indeed sent to, not the address of the interface that received it.
Any other ideas?
|
|
|
|
|
Does this[^] help anything? I guess it only works for UDP and on Windows XP and later OS versions even if it could help you.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
It might be, but it appears to need WSARecvMsg in order to work. I cannot find any comprehendable examples to work with and it's confusing.
|
|
|
|
|
Hi all,
Within my application I have a button that launches the windows XP OSK which works fine.
The problem lies in the fact that this application is to operate on a touchscreen and being fullscreen restricts the user from accessing the taskbar. If the user minimises the OSK I cannot get it back without closing the application to gain access.
So my question is this, can I get the status of the OSK, that is, minimised, running etc? so I can maximise it again from my application?
The button in my application at the moment just opens the OSK but if it is already open (minimised) I cannot get it back.....
Hopefully someone can help with this?
Cheers
Jim
|
|
|
|
|
Hello,
I was just wondering if you managed to solve this problem, I am also searching for a way to do this, so that I can "catch" a key selected in the on screen keyboard.
Cheers.
|
|
|
|
|
I am using ONCTRLCOLOR to make the static control tranparent. But my problem is that setWindowText leaves the old text on the screen and draws the new text on top of it.
|
|
|
|
|
If you've subclassed the CStatic, and put in a reflected handler for WM_CTLSTATIC (which is what I'd do to make it selfcontained), you could also override SetWindowText and invalidate the parent window (just at the rectangle covered by your control).
Bit of a kludge, but a legit one.
Iain.
Codeproject MVP for C++, I can't believe it's for my lounge posts...
|
|
|
|
|
I use adodb com object in my vc projects and I call SQL SERVER Sp by adodb com that returns many query too
the problem occurs when my SQL SP contains insert , delete , or update .
at this time I can't get results of SP query
example :
ALTER PROCEDURE [dbo].[MySP]
@Par1 VARCHAR(50),
@Par2 INT
AS
INSERT INTO MyDB.dbo.MyTable
(
Field1,
Field2
)
VALUES
(
@Par1,
@Par2
)
SELECT 1 AS RESULT -- I can not get this value from VC pragram
bec I used before INSERT
|
|
|
|
|
Please, take a deep breath and then try to elaborate your question (if is it a question...) a bit.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
If I change style of Combobox to Drop List, its backcolor is changing to grey.
I want Drop List (readonly) with white background same as the one in VC++ for selecting Release/Debug configuration.
Also I would like to have border around it.
How to do this? Any suggestion would be greatly appreciable..
|
|
|
|
|
Create a class that derives from CComboBox .
Override the OnCtlColor virtual function.
Check for CTLCOLOR_LISTBOX in the 3rd parameter.
Return the required brush.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
In addition to Superman's reply...
1/ There's a reason the colour has changed - the behaviour has changed. By overriding the colour back to white, you are now lying to your users. They will go "ahah, ah enabled box we can type it. Look, it's white!". And then they will get very frustrated. Only override this if you are REALLY sure you can cope with the potential confusion - and people issuing bug reports against you. Or worse - not giving you money.
2/ Don't just go for RGB(255,255,255). What if your customer is stuck in the 70s and likes a green on pink colour scheme? Who are you to say it's ugly? Please pick one of the system colours. That helps you - you can use GetSysColorBrush and be lazy!
Iain.
Codeproject MVP for C++, I can't believe it's for my lounge posts...
|
|
|
|