Click here to Skip to main content
15,914,500 members
Home / Discussions / Java
   

Java

 
GeneralRe: java Pin
jschell15-Mar-12 8:11
jschell15-Mar-12 8:11 
AnswerRe: java Pin
jschell15-Mar-12 8:14
jschell15-Mar-12 8:14 
QuestionXMPP File Transfer Pin
Praveen Singh Rajpoot 15-Mar-12 2:44
Praveen Singh Rajpoot 15-Mar-12 2:44 
AnswerRe: XMPP File Transfer Pin
Richard MacCutchan15-Mar-12 4:10
mveRichard MacCutchan15-Mar-12 4:10 
QuestionWifi LAN connection with java Pin
Member 805479114-Mar-12 1:18
Member 805479114-Mar-12 1:18 
AnswerRe: Wifi LAN connection with java Pin
Nagy Vilmos14-Mar-12 3:39
professionalNagy Vilmos14-Mar-12 3:39 
AnswerRe: Wifi LAN connection with java Pin
jschell14-Mar-12 8:42
jschell14-Mar-12 8:42 
QuestionJavaAccessBridge setTextContents returns false Pin
Bernhard Hiller11-Mar-12 20:47
Bernhard Hiller11-Mar-12 20:47 
From a C# program, I can read the text in Java textboxes (JTextArea, JTextField, TextArea). These texts are editable. When I call the setTextContents function, it always returns false; no error happens, Marshal.GetLastWin32Error() returns 0. How can the problem be resolved?

Some code snippets used on my Win7 64bit machine (my application is running as a 32bit application, and the Java program was started with the 32bit java.exe):
C#
[DllImport(WinAccessBridgeDll, SetLastError = true, ThrowOnUnmappableChar = true, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Auto)]
public extern static unsafe Boolean setTextContents(Int32 vmID, Int64 AccessibleContext, string text);

It does not matter which CharSet I use (tested all 4 available types).

The context in which the function is called is:
C#
AccessibleTextItemsInfo textInfo = GetAccessibleTextItemsInfo(vmID, textbox, 0);
MessageBox.Show("Der gegenwärtige Text lautet:\r\n" + textInfo.sentence);
string replacement = "Laber laber blah blah!";
if (!WABAPI.setTextContents(vmID, textbox.accessibleContext, replacement))
{
    int errorCode = Marshal.GetLastWin32Error();
    MessageBox.Show(string.Format("Ändern des Textes fehlgeschlagen mit code = {0}!", errorCode));
}

AnswerRe: JavaAccessBridge setTextContents returns false Pin
TorstenH.11-Mar-12 22:42
TorstenH.11-Mar-12 22:42 
GeneralRe: JavaAccessBridge setTextContents returns false Pin
Bernhard Hiller11-Mar-12 23:52
Bernhard Hiller11-Mar-12 23:52 
GeneralRe: JavaAccessBridge setTextContents returns false Pin
Richard MacCutchan12-Mar-12 0:23
mveRichard MacCutchan12-Mar-12 0:23 
GeneralRe: JavaAccessBridge setTextContents returns false Pin
Bernhard Hiller12-Mar-12 0:39
Bernhard Hiller12-Mar-12 0:39 
GeneralRe: JavaAccessBridge setTextContents returns false Pin
TorstenH.12-Mar-12 1:37
TorstenH.12-Mar-12 1:37 
GeneralRe: JavaAccessBridge setTextContents returns false Pin
Bernhard Hiller12-Mar-12 4:30
Bernhard Hiller12-Mar-12 4:30 
GeneralRe: JavaAccessBridge setTextContents returns false Pin
jschell12-Mar-12 9:04
jschell12-Mar-12 9:04 
Questiontransparent frame Pin
Member 86959453-Mar-12 1:14
Member 86959453-Mar-12 1:14 
AnswerRe: transparent frame Pin
Nagy Vilmos5-Mar-12 22:49
professionalNagy Vilmos5-Mar-12 22:49 
QuestionAPI Function Pin
rahmat_2029-Feb-12 1:07
rahmat_2029-Feb-12 1:07 
AnswerRe: API Function Pin
TorstenH.29-Feb-12 1:56
TorstenH.29-Feb-12 1:56 
GeneralRe: API Function Pin
rahmat_201-Mar-12 20:54
rahmat_201-Mar-12 20:54 
GeneralRe: API Function Pin
Richard MacCutchan1-Mar-12 23:16
mveRichard MacCutchan1-Mar-12 23:16 
GeneralRe: API Function Pin
jschell2-Mar-12 7:46
jschell2-Mar-12 7:46 
AnswerRe: API Function Pin
Richard MacCutchan29-Feb-12 3:02
mveRichard MacCutchan29-Feb-12 3:02 
AnswerRe: API Function Pin
gebri1-Mar-12 20:44
gebri1-Mar-12 20:44 
QuestionScanner isn't scanning Strings Correctly. Pin
johtnkucz27-Feb-12 7:06
johtnkucz27-Feb-12 7:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.