Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4561810
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T18:07:38+00:00 2026-05-21T18:07:38+00:00

I am writing a test project HelloPhone in c# Windows Phone 7 and i

  • 0

I am writing a test project “HelloPhone” in c# Windows Phone 7 and i am trying to use
a C++ DLL/clr. Well at execution i get an unhandled exception error reporting that attempt
to call the DLL function failed. I am not a C# programmer so here is my code:

using System;
using System.Runtime.InteropServices;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Tasks;
using Microsoft.Phone;
using DldesAPI;
using System.Runtime.InteropServices;

namespace DldesAPI
{
    public class DldesLib
    {

      [DllImport("DLDESLIB.dll", CharSet = CharSet.Auto)]
      public static extern int GetVersionNumber();

 //       [DllImport("DLDESLIB.dll")]
 //       public static extern int EncryptFirst(byte *pSrc,int SrcLen,byte *pDst,byte *pKey,int iKLen,long *wa,bool bRand);
    }
}

namespace HelloPhone
{
    public partial class MainPage : PhoneApplicationPage
    {
        // Constructor
        public MainPage()
        {
            InitializeComponent();
        }

        private void ClickMeButton_Click(object sender, RoutedEventArgs e)
        {


            int x = 0;
            string Msg;
            Msg=MessageTextBox.Text;

            x = 1;
            x = DldesLib.GetVersionNumber(); 





        }
    }
}

Could you please tell me what i do wrong?

Thnk you.
Spyros

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T18:07:39+00:00Added an answer on May 21, 2026 at 6:07 pm

    yea duder, this kinda stuff probably isn’t supported on WP7 (as far as I know):

    using System.Runtime.InteropServices;

    [DllImport("DLDESLIB.dll", CharSet = CharSet.Auto)]
    

    It’s running on a compact version of the .net framework.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm writing a small CMS as a Rails test project (also planning to use
I'm writing test cases for a project which still uses the Acegi plugin (not
i am writing unit test for a C# project. One of the event handler
I am writing some test Android apps using Eclipse. I created my 1st project,
I am writing some test Android apps using Eclipse. I created my 1st project,
I am writing my unit test cases for a Java project using Scala (JUnit
Iam writing a test method (in a .Net Test Project) and i need to
I am writing unit test for zend project, I want to know <?php class
Coders, I am in process of writing test cases for Asp.net MVC 3 project
I have a Java Project in which I am writing a simple JUNIT test

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.