|
Hi,
I want to create a webservice to which data is sent, for example a phonenumber or a customerID. And a acknowledge-message (ack of nack) is sent back my webservice.
I'm using C# .NET 2008.
Does ayone have some examples for how to get started?
How does a webservice know when a message is being sent?
Thanks
sirTachyon
|
|
|
|
|
Hello!
I have been looking in this article: Drawing Cards with Cards.dll[^] and wanted to try it out myself.
But I have not find out how to initialize the cards.dll on Windows 7. I downloaded cards.dll and put in under: c:\windows\system32. This is my code so far:
public partial class Form1 : Form
{
[DllImport("cards.dll")]
private static extern bool cdtInit(ref int width, ref int height);
public Form1()
{
InitializeComponent();
int width = 12, height = 12;
if (!cdtInit(ref width, ref height))
throw new Exception("cards.dll did not load");
}
}
The if-statement crashes with the a BadImageFormatException with this message (translated from Swedish to English):
"An attempt to read the program/application with bad format was made. (Exception from HRESULT: 0x8007000B)"
How shall I make this work?
|
|
|
|
|
It looks like you are trying to load a 32bit dll from a 64bit program. Are you using a 64bit os and compiling you program for any platform? If so you can try to compile your app for 32bit only (set the project’s properties from "any" platform target to "x86" - it will run also on 64bit systems) and see if it works.
Hope it helps.
|
|
|
|
|
|
Hi! is it possible that my dbase is sql2005 using php and javascript
becoz our existing system te dbase is sql2005 and we want to publish our system in web using php and javascript but our database is sql2005
|
|
|
|
|
Yes there is a driver for SQL Server in the php distributions. Further info can be found here[^], and you're in the wrong forum...
|
|
|
|
|
hi all
i have a method that will represent an mdiChild form
it works ! but i want it to return a form with the type of entered argument (formType) what should i do?
/////////////////////////////////
private Form Find(Type form)
{
foreach (Form frm in this.MdiChildren)
if (frm.GetType() == form)
return frm;
return null;
}
/////////////////////////////////
i tried to use this one but it does not work!
/////////////////////////////////
private Form Find(Type form)
{
foreach (Form frm in this.MdiChildren)
if (frm.GetType() == form)
return (form)frm;
return null;
}
/////////////////////////////////
would u help me what should i write instead of "return (form)frm;" ?
thanks!
|
|
|
|
|
It's because of your return type.
You should just return the child form that you found, and cast it to the desired type in the calling method.
You may also have to fully qualify the type you're passing in (MyApp.MyAppChildForm instead of just MyAppChildForm ).
MyApp.MyAppChildForm child = FindChildOfType(MyApp.MyAppChildForm);
if (child != null)
{
}
private Form FindChildOfType(Type formType)
{
foreach (Form child in this.MdiChildren)
{
if (child.GetType() == formType)
{
return child;
}
return null;
}
}
BTW, in the code snippet I posted, I changed the variable names in your Find method to something more appropriate.
EDIT - I changed the name of the method I posted to match the call the code was making... (slaps forehead)
.45 ACP - because shooting twice is just silly ----- "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." - J. Jystad, 2001
modified on Monday, May 3, 2010 12:46 PM
|
|
|
|
|
thanks for your attention and variable`s name correction!
i do that conversion in my code ... but i what to make it better & more beautiful
i will try this kind of meaningful naming from now on !
but the problem still persists !
|
|
|
|
|
You could possibly make Find a generic method.
|
|
|
|
|
hi
would you give me a Little sample or show me a link about "Generics" that explain me this topic more simpler ?
|
|
|
|
|
Sure. Given a List<System.ValueType> (lis) containing values of different types, this will retrieve the first one that is of a specified type:
private static T
GetValue<T>
(
) where T : struct
{
T result = default(T) ;
foreach ( System.ValueType v in lis )
{
if ( v.GetType() == typeof(T) )
{
result = (T) v ;
break ;
}
}
return ( result ) ;
}
int i = GetValue<int>() ;
You can easily modify it to use Form rather than ValueType and make it more robust.
|
|
|
|
|
Dear my friends. I am currently a 3rd year computer science student and mostly we have learned programming languages and its the time to do our senior project. 2 of my friends and me are good programmers specially in C# and all of us have a good knowledge of Database design, System design,PHP ... almost we mastered all of the subjects.
But we need a better idea. If you have any idea that is either stand alone application, web application (either intranet or internet based) Please share me your ideas so we will have the best project in our batch.
Thank you
|
|
|
|
|
I'm sorry, but people here aren't going to give you ideas for your project. We have had many requests over the years and we never help with this one. There's a very important reason for this - it's your project, so it has to be something that you are comfortable with. Only you know what you are capable of as a coder, so only you will know whether or not you can tackle a particular subject. More importantly, the topic should be something that keeps you interested as you will be spending a lot of time on this.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Bullshit.
I'll help with ideas anytime. I'm not so good at providing code, but I never run short of ideas.
"A Journey of a Thousand Rest Stops Begins with a Single Movement"
|
|
|
|
|
Roger Wright wrote: I'll help with ideas anytime
I think the OP wanted GOOD ideas
|
|
|
|
|
I agree. But you wouldn't want any of my ideas.
Instead, find your own. In today's CodeProject Daily News email, there's a link to an article about "10 Sharepoint Deployment Challenges". Fix one of them so that there are only 9. Or, if Sharepoint doesn't appeal to you, read another article with a list of 10 problems and fix one. Don't trust articles listing less than 10 problems because any worthwhile list has 10 items, and fewer is an indication that the easy ones have been fixed.
|
|
|
|
|
hi friend i also a university student , My mojor is GIS(Geographic Information System) ,now i am doing my senior project ,If prossible wo can talk about the idea of programming....
modified on Monday, May 3, 2010 5:16 AM
|
|
|
|
|
When you want to reply to somebody, there is the option to email them. I'd recommend using that option because you really don't want to put your email address in a public form - that's just inviting spam.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Excellent advice, Pete.
"A Journey of a Thousand Rest Stops Begins with a Single Movement"
|
|
|
|
|
thanks !! i have edited it and deleted my private email
|
|
|
|
|
Ah, Senior Project.... I well remember it. I designed a submersible data collection system for a buoy 3" in diameter to collect sea water information and transmit it to another senior project that had to record the data. That was fun...
I have a project that I'm working on in my own time that you're welcome to take on as a senior project, and I think it would be a good match for your skills and interests.
I design and build electrical power substations, among a few other duties. In those substations there are 4 or 5 devices that we monitor for temperature, number of operations, current and voltage, that sort of thing. The number of variables is not large, but it's important information to gather so that we can predict when various devices will need maintenance before they fail. Each month I send linemen out to record on paper the values I need, then I enter them in a spreadsheet. That's not an ideal solution, and I'd really like to put the data into a database, then analyze trends to predict when I should take an item out of service for preventative maintenance. I'd prefer a solution using C#, since that's the language I'm now trying to master, and storing the data in a SQL Server database would be perfect.
The analysis part is beyond the scope of this effort- I'll add that myself. But the data collection part might be a good fit for your project. If this interests you, feel free to email me. If not, keep in mind that the major cause of project failures is the failure to limit the scope. Things that look easy in the requirements phase often turn out to be nightmares when it comes to actually implementing a solution.
For your project, keep it simple. The purpose of a Senior Project is to demonstrate your mastery of the subject matter, not to create an application to save the universe. It's awfully easy to lose sight of that fact. Good luck to you, and I hope you have as much fun with yours as I did mine!
"A Journey of a Thousand Rest Stops Begins with a Single Movement"
|
|
|
|
|
Well, there's a first. This is the first time I've seen somebody offer sensible advice on a project idea in this forum. Whether or not this captures the OPs imagination is a different matter (or if they can sustain that for the duration of the project).
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Pete O'Hanlon wrote: if they can sustain that for the duration of the project
You're right about that! Sometimes what seemed like a good idea turns into a horror when the project gets into details.
"A Journey of a Thousand Rest Stops Begins with a Single Movement"
|
|
|
|
|
Thank you for your help. Even if your ideas is good one, I think it will be difficult for me, because in our country your problem can be solved by electrical engineers not computer programmers. I think it needs working with hardware. But our main focus is programming and it is only software.
I found a new idea with my friends and it is something related to Mobile Banking System. There is no such thing in our country. If we do this, we will be the first one. Our main concern is the infrastructure will look like.
1) It is a mobile application
2) It needs a high security
3) There must be an intelligent system from the bank’s server side which will accept incoming requests and send the appropriate answer to each user.
If you have any idea about this please help me out. Thank you.
|
|
|
|